Please enable JavaScript.
Coggle requires JavaScript to display documents.
Principles of microservices (Hide implementation details (The services…
Principles of microservices
Model around business domain
Gives more stable API
Apply DDD principles to locate bounded contexts
Embrace the culture of automation
A lot more deployable units
Build a platform to build, run tests, deploy
Hide implementation details
The services should evolve independently
If you share a database between services you expose internal implementation details
Within a bounded context you should expose the minimum information about the internal entities specific to the context
Decentralize all the things
Teams should be autonomous
Self-service
Be able to provision env by yourself
Don't disseminate domain logic to a service bus
API gateways in modern microservices architecture becoming like an enterprise grade magical service bus
Deploy independently
Co-existing endpoints of 2 different service versions
Write consumer tests to verify their expectations about producer contract
Should be executed on each check in in the producer repo
https://github.com/realestate-com-au/pact
Consumer first
API is kind of user interface for other teams
Document API
Isolate failure
It's not true that by breaking up the functions across different machines makes the system more resilient
E.g. each machine has a certain probability of failure
Network partition increases possibility of a timeout
Fail fast
Slow failures consume a lot of resources
Reduce timeout to the min possible value
Bulkhead pattern (e.g. a separate thread pool per application being proxied)
Use circuit breaker
Opens after a particular number of failures and gives the target a chance to recover by applying exponential backoff timeout
Make things observable
Collect and aggregate logs
Collect and aggregate stats
Add correlation ids
Zipkin?
Visual representation of the service dependencies based on correlation id