What is microservice? What are the properties of microservice?

What is microservice?

“Microservice Architecture” has no concrete definition but we can describe it as a way of designing software applications that have independently deployable services, intelligence in the endpoints, and decentralized control of languages and data.

Instead of big applications, we should build smaller parts. Each part serves one particular purpose. We call that a service. Single service allows us to loosely couple the applications. Each service can use a different programming language.

Microservice focuses on the idea of making these services as small and independent as possible. It is possible to make independent services using a common format and common protocols. For web services, the most popular formats are JSON and XML. The protocol used the most is HTTP.

Properties of microservice

  • Microservice should have its own deployment cycle and build around business capabilities
  • Microservice should have its own separate database layer
  • Microservice should have its own independent codebase, independent CI/CD pipeline, and independent testing tools that are not dependent on other services
  • Microservice should have its own observability, which means it should have independent logging, independent monitoring, and independent retry in case of failure
  • Microservice should have its own independent security mechanism
  • Microservice should be able to run without waiting for other services to be alive