Microservice architecture is an approach of building smaller services and each service runs in its own process and communicates with other processes using protocols such as HTTP/HTTPS, WebSockets, or AMQP.
What do you mean by small service? how much is small?
Size varies from project to project. Size shouldn't be the important point. Instead, the important point should be to create loosely coupled services so you have autonomy of development, deployment, and scale, for each service. Think about cohesion, how much independent it is from other services.
What advantages do we get from this?
There are many, but to start with Microservices enable better maintainability in complex, large, and highly-scalable systems by letting you create applications based on many independently deployable services that each have granular and autonomous lifecycles.
Microservices can scale out independently. It means you can scale out only specific high demand services rather than scaling out other areas of the application that don't need to be scaled.
Microservices provides long-term agility
Monitoring and health checks of the services and infrastructure.
Security design and implementation at multiple levels: authentication, authorization, secrets management, secure communication, etc.
Rapid application delivery, usually with different teams focusing on different microservices.
Why do we choose this complexity? The advantages in large, scalable systems are clear:
Independent Scalability: You can scale out only specific high-demand services (like a "Black Friday Checkout" service) without paying to scale the entire application.
Long-Term Agility: Smaller codebases are easier to understand, test, and refactor.
Technological Freedom: Different teams can use different stacks (e.g., .NET for core logic, Python for AI, Node.js for real-time) best suited for their specific microservice.
Granular Lifecycles: Teams can deploy updates to their specific service without coordinating a "Big Bang" release with the rest of the company.