Flow 4 · Go · interview path

System evolution and deployment

Extract a service from a monolith the strangler way, then ship new Go instances without a maintenance window — rolling, blue-green, or canary, with expand-and-contract schema.

Introduce a service into a monolith

Scenarios

  • Healthy
  • Active
  • Bottleneck
  • Failed
  • Protective
HTTPdrainreadycachewritesreplicateasyncpoisontraces
clientClient
  • POST /v1/orders
  • Idempotency-Key
edgeCDN or API Gateway
  • TLS · routing
  • GET cache at edge
protectRate Limiter
  • Inbound 429
  • tenant key
spreadLoad Balancer
  • Ready only
  • drain
fleetStateless Go instances
  • cmd/api · no affinity
go-1go-2go-3
cacheRedis cache
  • Hits · idempotency
  • TTL holds
writePrimary database
  • Writes · pool
  • invariants
readRead replica
  • SELECT only
  • browse lag OK
vNOld version
  • Drain · rollback
vN+1New version
  • Ready first
cbCircuit breaker
  • Fail fast
  • not inbound RL
downPayment service
  • Downstream
  • of Order
stockInventory service
  • Atomic decrement
  • last item
sideNotification service
  • Off the request path
bufferQueue
  • Durable · partitioned
poolWorker pool
  • Bounded G
w-1w-2w-3
poisonDLQ
  • Park
seeMetrics, logs, tracing, alerts
  • p95 / p99 · find the bottleneck first
62%

Click a box or a plane · packets follow the request

Why this answer holds