Microservices

Vijaya Chandran Mani
@vijaycs85
Microservices
What?
The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
Source: https://martinfowler.com/articles/microservices.html
Example?
Theatres
Movies
Tickets
Payments
Notifications
Reconciliation
External
IMDB
Advantages
- Scalability
- Fault isolation
- Simple code base
- No technology barriers
Monolithic System
FIRST DEPLOYMENT
Prod & Non-Prod environment

N-TH DEPLOYMENT
Non-Prod environment

N-TH DEPLOYMENT
Prod environment

Problem
- DB Import
- DB size increases over time
- Deployment & Rollbacks are hard
- (Auto) Scaling is complex (multi nodes)
- Slow dev builds
Stateless
FIRST & N-TH DEPLOYMENT
Prod & Non-Prod environment

Advantages
- Zero downtime deployment & rollback
- Same process for all environments
- Versioning done by git branch/tag
- Easy to scale
Notes
- Restricted edit points (better to keep one)
- Additional step to export content
- Additional deployment steps to sync Prod
- Managing admin users and passwords (Security)
Workflow
Content Editor Workflow

Developer Workflow

Implementation
Drupal


Sample Data

Data flow

1
2
3
Github


CircleCI

Branch: gh-pages


Output

Thank you
d8microservice
By Vijay Chandran Mani
d8microservice
- 1,292