Fundamentals of Microservices Design

  1. Define the correct microservice scope
    1. When we talk about the scope of a microservice, we are referring to the features of an independent software module. The ability of microservices to perform as a nearly-stateless system allows it to be developed independently.
    2. Create a unique service which will act as an identifying source, much like a unique key in a database table.
  2. Have loose coupling with high cohesion
    1. We should create correct API and take special care during integration. The microservices style is usually organized around business capabilities and priorities.  Unlike a traditional monolithic development approach—where different teams each have a specific focus on, say, UIs, databases, technology layers, or server-side logic—microservice architecture utilizes cross-functional teams.  The responsibilities of each team are to make specific products based on one or more individual services communicating via message bus. In microservices, a team owns the product for its lifetime.
  3. Restrict access to data and limit it to the required level
  4. Maintain a smooth flow between requests and responses.
    1.  Microservices receive requests, process them and generate a response accordingly.Easy integration and automatic deployment (using open-source continuous integration tools such as Jenkins, Hudson, etc.)
  5. Automate most processes to reduce time complexity
  6. Keep the number of tables to a minimum level to reduce space complexity
  7. Monitor the architecture constantly and fix any flaw when detected.
  8. Data stores should be separated for each microservices.
  9. For each microservices, there should be an isolated build.
  10. Microservice architecture gives developers the freedom to independently develop and deploy services.
  11. Deploy microservices into containers
    1. The idea is to containerize ‘like’ services and their required assets into a singular package. A container offers an isolated workload environment in a virtualized operating system. By running your microservices in separate containers, they can all be deployed independently.
  12. Servers should be treated as stateless.

Leave a Reply

Your email address will not be published. Required fields are marked *