Finding
The local Compose demo exposes a single driver-location-api instance directly on host port 8000. The repository models event-driven domain flows, but the current HTTP entry point has no local Layer-7 load balancer or multi-replica demonstration.
Requested work
Add a production-quality HTTP load-balancing layer at the API gateway boundary while preserving the event-driven architecture.
Scope
- Place NGINX or an equivalent Layer-7 proxy before stateless API replicas; keep Kafka, Redis Streams, RabbitMQ, and workers as asynchronous infrastructure rather than proxy targets.
- Update Compose so only the load balancer is host-exposed and
docker compose up --scale driver-location-api=3 (or the compatible service name) can demonstrate horizontal API scaling.
- Add/verify lightweight health and readiness endpoints before making an instance eligible for traffic.
- Ensure shared state is externalized or documented; requests must not rely on process-local state across replicas.
- Propagate forwarded headers and request IDs without bypassing authentication or rate limiting.
- Add automated NGINX config validation, proxy routing, multiple-backend observation, unhealthy-replica resilience, and Compose/CI validation.
- Add reproducible load-test and fault-demonstration commands, with results explicitly pending until measured.
- Integrate existing Kubernetes Service/HPA manifests only where they are real and non-conflicting; document local proxy versus Kubernetes Service/Ingress behavior.
Acceptance criteria
Evidence
docker-compose.yml contains a single driver-location-api service and maps 8000:8000.
- The existing Compose health check targets
/driver-location/health.
- The README identifies Docker/Kubernetes assets and broker-backed asynchronous components, but no local proxy/replica layer.
- No open issue mentioning NGINX, load balancing, or horizontal scaling exists as of 2026-08-12.
Dependencies / decisions
The implementation must preserve the API-to-domain-service-to-event-broker model and avoid making a reverse proxy responsible for asynchronous delivery.
Finding
The local Compose demo exposes a single
driver-location-apiinstance directly on host port 8000. The repository models event-driven domain flows, but the current HTTP entry point has no local Layer-7 load balancer or multi-replica demonstration.Requested work
Add a production-quality HTTP load-balancing layer at the API gateway boundary while preserving the event-driven architecture.
Scope
docker compose up --scale driver-location-api=3(or the compatible service name) can demonstrate horizontal API scaling.Acceptance criteria
Evidence
docker-compose.ymlcontains a singledriver-location-apiservice and maps8000:8000./driver-location/health.Dependencies / decisions
The implementation must preserve the API-to-domain-service-to-event-broker model and avoid making a reverse proxy responsible for asynchronous delivery.