A good microservice provides business capabilities. Ideally, microservices should follow the single responsibility principle. Because of this, microservices are generally small in size. Typically, a rule of thumb that I use is that it should be possible to build and deploy a microservice within 5 minutes. If the building and deployment take 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