Small and lightweight microservices

A good microservice provides a business capability. Ideally, microservices should follow the single responsibility principle. Because of this, microservices are generally small in size. Typically, a rule of thumb I use is that it should be possible to build and deploy a microservice within 5 minutes. If the building and deployment takes any longer, it is likely that you are building a larger than recommended microservice.

Some examples of small and lightweight microservices are as follows:

  • Product recommendation service
  • Email notification service
  • Shopping cart service

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.