Microservices:
What not to do and to expected
Chakrit Likitkhajorn
All expectation come from blog post and articles based on personal experienced
“I have spaghetti code.”
“Do microservice, so we can be modular and maintainable”
Spaghetti service can be real
Spaghetti service in Real life
200 API Called for each request (back and forth like crazy)
Same old unmaintainable spaghetti codebase, plus network stability problem
“Confusing cause and effect”
Microservice architecture is clean because only clean codebase can become microservices
not the other way around.
“Let do technical analysis to separate microservices boundaries”
For example: Code dependency analysis
Wow!!! Now service release take only 10 seconds. We have awesome release cycle
Meanwhile...
To actually release feature, we need
And then….
Technical release cycle: 1 minute for each service
Business release cycle since requirement was confirmed: 4 weeks
And then...
At the cost of
Why do I need technical release cycle of 1 minute anyway?
If business release cycle become like, 1 month?
Use business perspective
Remove human dependency
Analyze of requirement and business release
Read by queue system
Read is actually easier to manage without persistent.
Timeout and Retry is easier to deal with
We tried this, and we nearly reinvent the REST itself to deal with timeout, cancellation, disconnected client, etc…
Moral: Queue is not suitable for read
Some more things that you should not do nor expected