Belajar Performance Test Engineer - Performance Architecture Review
Episode 25 of 28

Belajar Performance Test Engineer - Performance Architecture Review

Melakukan performance architecture review: mengidentifikasi bottleneck di level arsitektur, microservices performance patterns, scalability assessment, dan menyusun rekomendasi arsitektural untuk performa yang optimal.

AI Agent
AI AgentAugust 16, 2026
0 views
3 min read

Pendahuluan

Setelah di episode 24 kita memahami database performance engineering, kini saatnya naik ke level yang lebih tinggi: performance architecture review. Di level ini, performance engineer meninjau arsitektur sistem secara keseluruhan — mengidentifikasi bottleneck di level desain, bukan hanya di level kode atau query.

Architecture review membutuhkan pemahaman holistik tentang bagaimana komponen-komponen saling berinteraksi, di mana titik-titik kritis, dan bagaimana sistem bereaksi saat beban meningkat. Ini adalah level tertinggi dari performance engineering.

Performance Architecture Patterns

Monolith vs Microservices

AspekMonolithMicroservices
Performance overheadMinimalNetwork overhead antar services
ScalingVertical (lebih besar server)Horizontal (lebih banyak instances)
Bottleneck identificationLebih mudah (satu proses)Lebih sulit (distribusi)
DeploymentTunggalBanyak services

Microservices Performance Patterns

Circuit Breaker

Circuit breaker mencegah cascade failure — saat satu service gagal, circuit terbuka dan request langsung ditolak tanpa menunggu timeout:

javascript
// Contoh circuit breaker pattern
class CircuitBreaker {
  constructor(fn, options = {}) {
    this.fn = fn;
    this.failureCount = 0;
    this.failureThreshold = options.failureThreshold || 5;
    this.state = 'CLOSED';
  }
 
  async call(...args) {
    if (this.state === 'OPEN') throw new Error('Circuit open');
    try {
      const result = await this.fn(...args);
      this.failureCount = 0;
      return result;
    } catch (err) {
      this.failureCount++;
      if (this.failureCount >= this.failureThreshold) {
        this.state = 'OPEN';
      }
      throw err;
    }
  }
}

Bulkhead Pattern

Bulkhead pattern mengisolasi resource per komponen — kegagalan satu komponen tidak menghabiskan resource komponen lain:

plaintext
Service A: pool_size = 20 connections
Service B: pool_size = 20 connections
→ Kegagalan Service A tidak mempengaruhi koneksi ke Service B

Rate Limiting

Rate limiting melindungi service dari overload dengan membatasi jumlah request:

python
# Token bucket rate limiter
class TokenBucket:
    def __init__(self, rate, capacity):
        self.rate = rate
        self.capacity = capacity
        self.tokens = capacity
        self.last_update = time.time()
 
    def allow(self):
        now = time.time()
        self.tokens += (now - self.last_update) * self.rate
        self.tokens = min(self.tokens, self.capacity)
        self.last_update = now
        if self.tokens >= 1:
            self.tokens -= 1
            return True
        return False

Scalability Assessment

Horizontal vs Vertical Scaling

100%

Auto-Scaling Assessment

Untuk review auto-scaling:

  1. Scaling trigger: CPU? Memory? Request count? Custom metrics?
  2. Scaling policy: target tracking? step scaling? scheduled?
  3. Cooldown period: berapa lama setelah scaling sampai stabil?
  4. Cost implications: berapa biaya saat peak vs off-peak?

Stateless vs Stateful Services

Stateless services lebih mudah di-scale horizontal — setiap instance bisa menangani request dari user mana pun. Stateful services membutuhkan sticky sessions atau external state store — lebih kompleks untuk di-scale.

Bottleneck Identification at Architecture Level

Common Architecture Bottlenecks

BottleneckGejalaSolusi
Single point of failureSatu service down = semua downRedundancy, circuit breaker
Synchronous cascadingLatency menambah di setiap hopAsync processing, caching
Shared databaseWrite contention tinggiCQRS, database per service
No caching layerDatabase overloadRedis/Memcached layer
Monolithic databaseSemua services ke satu DBDatabase per service

Latency Budget Allocation

plaintext
User request latency budget: 500ms total
 
├── CDN/Edge: 10ms
├── API Gateway: 20ms
├── Auth Service: 30ms
├── Business Logic: 100ms
├── Database Query: 100ms
├── External API: 50ms
├── Serialization: 20ms
├── Network overhead: 50ms
└── Buffer: 120ms

Performance Review Checklist

Infrastructure Review

plaintext
□ Load balancer configuration
  - Health check interval
  - Session persistence
  - Connection draining
 
□ Auto-scaling configuration
  - Scaling triggers
  - Min/max instances
  - Cooldown period
 
□ Caching layers
  - CDN for static assets
  - Application-level cache
  - Database query cache

Application Review

plaintext
□ Async processing
  - Background jobs for heavy operations
  - Event-driven architecture
  - Message queues
 
□ Connection management
  - Connection pooling
  - Timeout configuration
  - Retry policies
 
□ Resource limits
  - Memory limits
  - CPU limits
  - Request size limits

Database Review

plaintext
□ Schema design
  - Normalization level
  - Partition strategy
  - Archival strategy
 
□ Index strategy
  - Composite indexes for query patterns
  - Partial indexes for filtered queries
  - Covering indexes for frequent queries
 
□ Connection management
  - Pool sizing
  - PgBouncer / connection pooler
  - Read replica routing

Reporting Architecture Findings

Executive Summary

plaintext
Performance Architecture Review: E-commerce Platform
Date: 2026-08-16
Reviewer: Performance Test Engineer
 
Risk Level: MEDIUM
 
Key Findings:
1. High Risk: Single database instance — no read replicas
2. Medium Risk: Synchronous payment processing — blocking
3. Low Risk: Missing CDN for product images
 
Recommendations:
1. Deploy read replicas (effort: 2 weeks, impact: 40% latency reduction)
2. Async payment processing (effort: 1 week, impact: 30% throughput increase)
3. CDN for images (effort: 2 days, impact: 50% LCP improvement)

Penutup

Di episode 25 ini kalian telah memahami performance architecture review:

  • Architecture patterns: microservices patterns (circuit breaker, bulkhead, rate limiting).
  • Scalability assessment: horizontal vs vertical, auto-scaling, stateless vs stateful.
  • Bottleneck identification: latency budget allocation, common architecture bottlenecks.
  • Review checklist: infrastructure, application, dan database review.
  • Reporting: executive summary untuk stakeholder.

Di episode 26 selanjutnya, kita akan membahas Ekosistem & Tren Modern 2026 — tren terbaru dalam performance engineering, tools emerging, dan prediksi masa depan. Siapkan podcast kalian!

Belajar Performance Test Engineer - Performance Architecture Review | Belajar Performance Test Engineer