Monolithic to Microservices for faster time to Market
Develop, Test, Deploy, Operate, and Scale individual components independently, and provide significant uplift for the business
- Over 7 years of constant development and multiple MVP (minimum viable product) releases, the code base has become highly monolithic and was hard to perform 2-week release cycles. There was a need to break down the monolithic application into multiple microservices and have its own service lifecycle.
- Take advantage of team’s diverse skillsets and build services that are polyglot in nature both at programming language and persistence storage.
- Quickly develop and deploy services for roadshows and demos and retire them as needed.
- Identify proper boundary context to split the services that can be loosely coupled and highly cohesive.
- Analyze the traffic for different API methods to understand the scalability aspect.
- Follow Microservices principles to make sure no service accesses another service data store, provide different service templates to quickly spin up new services, build services in a consistent way, and define proper API contracts between services.
- Identified around 80 services from the monolithic application and converted them into microservices.
- Applied necessary data model changes, split the data across multiple physical databases and logical schemas that are needed for individual services and adhere to boundary context principles.
- Followed read-only microservice pattern where 95% of the services are read-only. This helped to quickly convert the monolithic into microservices. All write intensive responsibilities are moved into data processing layer.
- The following technologies were chosen to implement the microservice architecture:
- Docker was chosen for containerization and built multiple base images for quick deployment.
- Registrator, Consul, Consul template, and Consul servers was chosen for service registry, discovery, and to apply Nginx templates dynamically.
- Filebeat, CollectD, Logstash, Kibana, and ElasticSearch was used for logging of all services.
- Jenkins was used for Continuous Integration and Deployment with blue-green deployment of crucial services.
- AWS API Gateway was used as routing and mediation purpose and also to take care of caching of services using Elasticache.
THE SOLUTION DIAGRAM: