Monolith to Microservices

Deploy the same codebase as either a monolith or microservices using different configurations.

Running

Monolith Deployment

go run main.go monolith

Access at http://localhost:3010

Microservices Deployment

go run main.go microservices

Key Concepts

Same Code, Different Configs

config-monolith.yaml

config-microservices.yaml

Benefits

Monolith:

Microservices:

Migration Strategy

  1. Start with monolith (faster development)
  2. Split config by service boundaries
  3. Deploy as microservices when needed
  4. No code changes required!