Skip to main content

Infrastructure Level 2 - Container and Service Details

This level provides detailed information about individual services, their container configurations, and deployment specifications.

Service Configuration Matrix

Microservices Deployment Specifications

ServiceReplicas (Dev/Prod)CPU/MemoryPortsVolume Mounts
Catalog1/20.5/1GB8080, 8443None
Chat1/20.5/1GB8080, 8443None
Basket1/20.25/512MB8080, 8443None
Ordering1/20.5/1GB8080, 8443None
Rating1/20.25/512MB8080, 8443None
Finance1/20.5/1GB8080, 8443None
Notification1/10.25/512MB8080, 8443None
Scheduler1/10.5/1GB8080, 8443None

Infrastructure Components

ComponentImageVersionPersistenceConfiguration
PostgreSQLpostgreslatestData volumeMulti-database
RedisredislatestNoneMemory cache
RabbitMQrabbitmqmanagementData volumeManagement UI
Qdrantqdrant/qdrantv1.15.1Data volumeVector storage
Keycloakkeycloak/keycloaklatestData volumeCustom theme
Ollamaollama/ollamalatestModel cacheGPU optional

Container Configuration Details

Database Schema Distribution

Environment-Specific Configurations

Development Environment

  • Container Runtime: Docker Desktop
  • Service Mesh: Not required
  • Monitoring: Local health checks only
  • Scaling: Single replica per service
  • Storage: Local volumes
  • AI Models: Lightweight (Gemma 3 1B)

Production Environment

  • Container Runtime: Azure Container Apps
  • Service Mesh: Built-in service discovery
  • Monitoring: Azure Monitor integration
  • Scaling: Auto-scaling enabled
  • Storage: Azure managed services
  • AI Models: Full capability (Gemma 3 4B)

Network Architecture

Service Communication Patterns

Port Allocation Strategy

Service TypeHTTPHTTPSAdminDebug
API Services80808443-5000+
PostgreSQL---5432
Redis---6379
RabbitMQ5672-15672-
Qdrant6333-6334-
Keycloak808084439990-

Security Configuration

Authentication Flow

  1. Client → API Gateway (with JWT)
  2. API Gateway → Keycloak (token validation)
  3. Keycloak → PostgreSQL (user lookup)
  4. Service → Downstream services (with validated context)

Authorization Matrix

ServicePublic EndpointsAuthenticatedAdmin Only
CatalogGET /books, /categoriesPOST, PUT, DELETEImport, Export
ChatNoneAll endpointsUser management
BasketNoneAll endpointsView all baskets
OrderingNoneUser ordersAll orders
RatingGET /ratingsPOST ratingsModeration

Monitoring and Observability

Health Check Endpoints

  • Service Health: /health - Overall service status
  • Readiness: /ready - Ready to accept traffic
  • Liveness: /alive - Service is running

Telemetry Data

  • Metrics: Performance counters, custom business metrics
  • Logs: Structured logging with correlation IDs
  • Traces: Distributed tracing across service boundaries
  • Dependencies: External service health and latency

Development Tools

  • Scalar: Interactive API documentation and testing
  • K6: Load testing and performance benchmarking
  • Health UI: Centralized health monitoring dashboard