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