Autonomous Services

Microservices is an architecture that is optimized around autonomy. Autonomy and loose coupling between the services are important characteristics of a microservices architecture. Loose coupling means that we can independently update one service without making changes to another. The loose coupling extends throughout the entire service, across the teams, and right down to the data store—a type of coupling that is often overlooked is at the data store.

Microservices interact through APIs, and they do not share database schema, data structures, or internal representations of the data. Teams that have been building web applications might be familiar with some of these concepts and have consumed other third-party services when building their application. If we are consuming a service from some third-party geocoding service, we would not integrate through the database or a shared service bus that couples our system to the third-party service. Instead, we would integrate through an API, and that API would be well documented, versioned, and easy to consume. If the service owner needs to fix a bug in the API, they can make and deploy the change without coordinating this effort with all the consumers of the API. These changes should not affect consumers of the application and if for some reason a breaking change is needed, then a new version of the interface is deployed and consumers can move to this version when they are ready.

You can think of each service as its very own application, having its own team, testing, build, database, and deployments. These services are built and managed like any other small application. They must remain independently deployable and will generally service a single purpose. This brings us to the next topic, the size of the individual services.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.76.175