Design Pattern: Factory
reading note
Basics of building microservice:
service routing — gives the microservice client a single logical URL to talk to and acts as a policy enforcement point for things like authorization, authentication, and content checking
service discovery — abstracts away the physical location of the service from the client
client resiliency
client load balancing — the way to cache the location of all health service instances on the service
circuit breaker pattern — the way to prevent the client from continuing to call a service that’s failing or suffering performance issues
fallback pattern — when a service call fails, the mechanism provided to carry out its work through alternative way
bulkhead pattern — the way to compartmentalize the calls so that the misbehavior of one service call can’t negatively impact the rest of the application
Heroku’s best practice guide — twelve-factor app
- codebase
- dependencies
- config
- backing services
- build, run, release
- processes
- port binding
- concurrency
- disposability
- dev/prod parity
- logs
- admin processes