Transition from a monolith to microservices
LinkedIn : designer.microsoft.com

Transition from a monolith to microservices

The first and very crucial step of this journey is to define “why” business should convert the existing monolith to microservices. This step can help shape many key decisions along the way including the how quick the transition should happen, where to start, scaling requirements & many other major design considerations, to name a few.

Assessment of the current state by performing a thorough analysis of existing monolithic system to identify deployment pain points, performance bottlenecks, and technology stack improvements etc. is crucial for making informed key decisions.

Below are some of the key benefits of microservices that can also shape the analysis phase. Pain points of existing system can be weighed against these benefits to build a case for adopting microservices. Scope of the current issues and cost savings from new architecture will empower the business to craft a path forward.

  • Granular Scaling: Microservices allow for independent scaling of individual components, enabling more efficient resource allocation and utilization based on the specific needs of each service. This contrasts with monolithic systems where the entire application must scale together. This can drastically reduce the resource & maintenance cost. In what areas, does the current monolith requires scaling?
  • Fault Isolation: Microservices architecture allows to isolate failure of one service from rest of the application components. This reduces the criticality, scope & cost of the failure. Which are the critical services that needs careful planning?
  • Decentralized Development: Microservices allow for decentralized development teams, each responsible for specific services. This enhances team autonomy, enabling faster decision-making and innovation within smaller, specialized groups. Which are the independent modules?
  • Technology Stack Flexibility: Microservices decoupled architecture allows the use of different programming languages, frameworks, and databases for each service. This flexibility empowers development teams to choose the best tools for specific tasks, fostering innovation and adaptability.
  • Seamless Integration with Third-Party Services: Microservices are inherently modular, making it easier to integrate with third-party services, APIs, or external systems. This is particularly beneficial in today’s interconnected digital ecosystem.
  • Independent Deployment: Microservices enable independent deployment of services, allowing teams to release updates and new features without affecting the entire system. This fosters a faster development cycle and more agile responses to changing business requirements especially while server scaling.
  • Decomposition Strategy: Selection of a decomposition strategy; a whether it’s domain-driven design, business capability-based, or data-driven, is crucial in breaking down the monolith into manageable microservices.

Further below questions can help to solidify the strategy, investment and timeline:

  1. Is business is spending handsome amounts in scaling monolith where only a handful of modules need more horsepower?
  2. Does single fault bring down entire application putting a halt on complete operations? Does large upgrade rollouts require extensive co-ordination?
  3. Most importantly how does this affect the business bottomline and to what extent?

Steps to adopt Microservices Architecture

Below are some of the most common design choices that most businesses adopt while transitioning to microservices, so most of these can be good candidates for a quick adoption.

  • Strangler Pattern: This is an approach to gradually replace existing components of the monolith with microservices than a big bang. As new features are developed & deployed as microservices, redirect traffic gradually. But this may be not be the approach of every transformation journey.
  • API Gateway and Communication: A robust API gateway oversees communication between microservices, centralizing API management while handling key functions such as authentication, load balancing, and routing. Rate limiting helps protect microservices' APIs from unauthorized security attacks. By implementing security measures at the API gateway level, microservices and backend databases are shielded from potential threats. The API gateway alleviates the burden on microservices by handling these critical issues.

  • Service Discovery: A central place to discover, use and maintain microservices avoid redundancy while providing overarching view. Central service registry that keeps track of the location and availability of each microservice. This helps services dynamically discover and communicate with each other.
  • Choreography and Orchestration: Choreography (decentralized coordination) or Orchestration (centralized coordination) for managing the flow of events and actions between microservices, can be achieved with the help of message brokers like ActiveMQ, RabbitMQ, Pub-Sub.
  • Database Decoupling: Microservices architecture allows to introduce a mix of multiple NoSQL-SQL databases by adopting a database-per-service or shared-database approach. This will allow to vastly scale the architecture, even globally. This plan will also involve data migration from existing monolith database to newly designed decoupled architecture. Mainenance & service plans will include data replication for consistency and new backup strategies as well.
  • Event Sourcing and CQRS: Explore event-driven architectures, event sourcing, and Command Query Responsibility Segregation (CQRS) to manage data consistency and scalability. Depending on the database architecture, data consistency can be achieved using variety of options. Data consistency appraoch can be also vary as per individual service needs.

This is not a exahustive list but a good starting point for getting the architecture on board. Few more common microservices patterns can be explored to fine tune the adoption model & milestones.

Ensuring Operational Excellence:

Microservices may demand a more sophisticated and different approach to deployment and monitoring than monoliths.

  • Containerization and Orchestration: Containerization tools like Docker and orchestration platforms like Kubernetes will allow efficient deployment and scaling as needed.
  • Continuous Integration/Continuous Deployment (CI/CD): CI/CD pipelines enabling automated testing and deployment process for quick rollouts while reducing the downtime & co-ordination.
  • Phased Rollout: An incremental approach by gradually transitioning functionality from the monolith to microservices, minimizes disruptions and provides continuous feedback for any future adjustments.
  • Monitoring and Logging: Comprehensive monitoring tools such as Elasticsearch, Logstash, and Kibana (ELK stack) or alternatives like Splunk, Graylog, or Fluentd & alerting tools (Prometheus, Grafana); track the performance and health of microservices including response times, error rates, and resource utilization. Centralized logging system facilitates troubleshooting and debugging including realtime alerts for disaster recovery & even to preempt potential issues.

grafana.com

Identity and Access Management (IAM):

With decoupled microservices, sophisticated authentication and authorization services can be adopted with the help of dedicated Identity servers.

  • Role-Based Access Control (RBAC): RBAC control access to microservices based on user roles and responsibilities. Auth0, Ping Identity, Ping Federate are some of the tools that can help centralize definition & monitoring of access control. Principle of least privilege can ensure each microservice has only the permissions it needs to perform its specific tasks.
  • Security Information and Event Management (SIEM): SIEM solutions help analyze security events across the microservices environment. E.g. Splunk, LogRhythm, IBM QRadar SIEM, Microsoft Azure Sentinel, Elastic Stack (Elasticsearch, Logstash and Kibana)
  • Security Audits: Regular security audits to identify and address vulnerabilities and for compliance purposes.

Last but not least

Below is one such sample microservices architecture that caters to users from different platforms. Traffic between microservices is routed using message brokers. Appropriate databases are selected for each microservice which ranges from simple cache DB to sophisticated RDBMS server. This architecture adopted multiple API Gateways for fine tuned configurations. In addition, docker deployment allows to scale application depending on the application users and seasons.

learn.microsoft.com

Below are some resources for Cloud-native microservices:

References :

learn.microsoft.com

aws.amazon.com

azure.microsoft.com

grafana.com


Kunal Dani

Marketing the Value of SaaS, iPaaS, DaaS in end to end Product Marketing Roles | Product Marketing | Partner Marketing | Marketing Communications

1 个月

Very insightful read!

要查看或添加评论,请登录

Pallavi Deshpande的更多文章

  • Master Data Management

    Master Data Management

    Master Data Management (MDM) manages and organizes critical business data to provide a single, consistent, accurate…

  • Message Brokers & Application Scalability

    Message Brokers & Application Scalability

    When designing an enterprise application, architects aim to create a modular and decoupled design. The application’s…

  • Common Data Model

    Common Data Model

    A common data model provides standardized and extensible data schemas comprising of entities, attributes, semantic…

    1 条评论

社区洞察

其他会员也浏览了