Microservices simplified

Saravanakumar Arunachalam
2 min readMar 22, 2024
microservices

Problem Statement

As our customer base continues to expand, there is a pressing need to expedite customer requests. Scaling the application to meet this demand effectively is crucial. However, scaling the monolithic application poses significant challenges.

Understanding Microservices Architecture

Microservices architecture is a concept that has gained traction in recent years, but its essence remains simple: breaking down larger services into smaller, more manageable components. This architectural style aims to address the increasing demands of user workloads by creating smaller, more specialized services.

Simplicity in Complexity

At its core, microservices architecture involves dividing a larger service-oriented architecture into smaller, more focused components. Despite the buzz surrounding microservices, it’s essential not to overcomplicate the concept. Essentially, it’s about breaking down complex systems into smaller, more manageable pieces.

Application in Real-Life Scenarios

Consider the analogy of delivering food in a metropolitan area. Instead of using a large truck, opting for smaller vehicles like cars or bicycles may enable quicker navigation through traffic and faster delivery times. Similarly, microservices allow for more efficient handling of user requests, optimizing latency and throughput based on growing user bases

Roles of Microservices

In the microservices landscape, various roles serve specific functions:

  • Data Service: Connects data sources and provides data to dependent services.
  • Business Service: Houses all business logic, including validation and transaction handling.
  • Translation Service: Translates business objects into formats understandable to client applications.
  • Edge Service: Acts as a gateway or proxy, enabling clients to connect to different microservices seamlessly.

Design Principles

Several design principles guide the creation, integration, and maintenance of microservices:

Decomposition Principles:

  • Domain-Driven Design (DDD): Focuses on designing subdomains within larger business domains, creating services and models for access.
  • Strangler: Involves gradually migrating smaller components from a monolithic application to microservices.
  • Business Process Aggregator: Combines related business services into a single service for specific use cases.
  • Sidecar: Supports the main application by extracting components and deploying them as dependent applications within the same instance.

Integration Principles:

  • Gateway: Acts as an entry and exit point for connecting with microservices, simplifying client connections.
  • Aggregator: Gathers data from multiple services and returns aggregated results to clients.
  • Edge Pattern: Serves traffic at the network edge, such as Content Delivery Networks (CDNs).

Data Principles:

  • Single DB: Each microservice connects to a single database, aiding scalability.
  • Shared DB: Multiple microservices connect to the same database with different schema sets, simplifying initial setups.
  • CQRS and Event Sourcing: Microservices communicate asynchronously through events.

Operational Aspects: Maintaining microservices requires additional effort in observability, alerting, documentation, service discovery, and continuous delivery. These operational aspects ensure better user experiences and necessitate measures like logging, metrics, and tracing tools such as Splunk, Datadog, and Dynatrace.

--

--