Comparative Analysis of Software Architectures
Monolithic vs Microservices
FALL Semester 2023 Department of Software Engineering
(COURSE TITLE: SE-6102 – Adv. Software System Architecture)
Sir Syed University of Engineering & Technology
Group Members
M.Faisal Riaz Bilgrmai (2023F-MSE-008)
Khuram Mawani (2023F-MCS-007)
Muhammad Salman (2023F-MSE-011)
Brief Overview of Microservices
• Microservices a combination of multiple small
scale and self-sufficient modules.
• Each module or service functioned as a single
business entity and work independently.
• Support Agility, Scalability and Versatile
Management.
• Micro service architecture become a popular
choice for large scale application .
Characteristics Microservices
 Uses APIs to communicate between Services
interaction
 Database of each service could be independent
 Each and every service or module is independent
 Scalability available at the individual level
 Supports vertical scaling.
 Focused on a single business outcome
 The architecture provides isolation in modules
 Management and monitoring of each service is different
Conceptual Diagram of Micro-Services
Architecture Highlights
 Implementation logic, architecture, and technologies (including programming language, database, etc.) are completely
hidden behind the API.
 Microservices communicate with each other using well-standardized lightweight internet protocols, such as HTTP and REST,
or messaging protocols, such as JMS or AMQP.
 Splitting large applications into individual microservices provides the next degree of independence to agile teams which
supports scaling agile methods.
 The microservice applications is loosely coupled architecture makes them more fault tolerant – the failure of one component
does not necessarily result in the unavailability of the whole system.
Strength & Weakness
Strengths Micro service
Scalability Microservices architecture allows individual services to scale
independently, enabling efficient resource utilization and
accommodating varying workloads.
Flexibility Each microservice can be developed and deployed independently,
facilitating rapid development cycles and reducing time-to-market.
Fault
Isolation
Since microservices operate independently, a failure in one service
does not impact the entire system, ensuring fault isolation and
resilience
Technology
Diversity
Microservices allow different services to use different technology
stacks, enabling organizations to choose the best tools and
frameworks for each specific task.
Team
Autonomy
Microservices promote decentralized development and
autonomous teams, fostering agility and innovation within an
organization.
Weaknesses Micro services
Development sprawl Microservices add more complexity compared to a monolith architecture, since
there are more services in more places created by multiple teams. If
development sprawl isn’t properly managed, it results in slower development
speed and poor operational performance
Exponential infrastructure
costs
Each new microservice can have its own cost for test suite, deployment
playbooks, hosting infrastructure, monitoring tools, and more.
Added organizational
overhead
Teams need to add another level of communication and collaboration to
coordinate updates and interfaces.
Debugging challenges Each microservice has its own set of logs, which makes debugging more
complicated. Plus, a single business process can run across multiple machines,
further complicating debugging.
Lack of standardization Without a common platform, there can be a proliferation of languages, logging
standards, and monitoring.
Lack of clear ownership As more services are introduced, so are the number of teams running those
services. Over time it becomes difficult to know the available services a team
can leverage and who to contact for support.
Case Study (NETFLIX) Background
 Netflix is one of the prominent case study that successfully
transformed from a traditional monolithic to cloud based micro
services architecture.
 Netflix is the pioneer successfully deployed the micro services model
pragmatically and introduced OSS (Open Source Software Center)
has a lot of tools and technologies which can be used by other
companies to create micro service architecture on the cloud.
 Netflix managed to split its single monolithic application into
hundreds of small loosely coupled services. Today Netflix has over a
1000 microservices, each managing a separate part of the site.
 The migration process began in 2009. It started out
by moving movie encoding, a noncustomer facing
application.
 By 2010 Netflix started moving the remaining
pieces to the cloud such as account signup, movie
selections, and other configurations
 By December 2011, Netflix had successfully
migrated its entire operation to the cloud – from a
monolithic to a then-unknown territory of micro
service architecture.
Case Study (NETFLIX) Key Micro services
• User Management
o Responsible for user authentication, authorization, and profile management.
o Enables features like multiple user profiles per account.
• Content Delivery
o Manages the distribution of content to users.
o Handles video transcoding, streaming, and content delivery based on user location and device.
• Recommendation Engine
o Analyzes user viewing habits and preferences.
o Provides personalized content recommendations to improve user engagement.
• Billing and Subscription
o Manages user subscriptions and billing information.
o Integrates with payment gateways for secure transactions.
• Search and Discovery
o Enables users to search for content efficiently.
o Manages metadata and indexing for quick content discovery.
• Analytics and Monitoring
o Monitors system health, user behavior, and performance.
o Provides insights for continuous improvement and resource optimization.
Case Study (NETFLIX) Benefits & Challenges
Benefits
• Scalability
o Each micro service can be scaled independently based on demand.
• Flexibility and Agility
o Enables rapid development and deployment of new features.
o Teams can work independently on different micro services.
• Fault Isolation
o Isolates failures to specific micro services, preventing cascading failures.
• Improved Performance
o Optimizes performance by allowing the use of different technologies for
specific tasks.
• Continuous Deployment
o Facilitates continuous integration and deployment of updates without
affecting the entire system.
• Enhanced Resilience
o Redundancy and failover mechanisms in place to ensure service
availability.
Challenges
• Complexity
o Managing a large number of micro
services requires sophisticated
orchestration and monitoring.
• Data Consistency
o Ensuring consistency across distributed
data stores can be challenging.
• Communication Overhead
o Increased communication between
microservices can lead to network
latency.
• Security
o Security concerns such as data
protection and secure communication
must be addressed.
Case Study (NETFLIX) Conclusion
1. In conclusion, Netflix's adoption of a micro services architecture has played a
crucial role in its ability to scale, innovate, and deliver a seamless streaming
experience to its global user base.
2. The approach has its challenges, but the benefits in terms of scalability, flexibility,
and agility outweigh the complexities for a platform of Netflix's scale.
Brief Overview of Monolithic Architecture
• An approach in which all components in an application
are connected in a single unit.
• There are no isolated modules or services, separate
codebases, or separate databases
• The deployment in the monolithic application generally
varies by each application.
• The management of the monolithic application is also
very easy.
• The monolithic approach seems to work well small scale
applications.
Characteristics Monolithic Architecture
 The monolithic approach is a natural and first-choice approach to building an application – all logic for handling
requests runs in a single process. A single codebase and self-contained application.
 Tightly coupled modules
 Utilize single technology stack
 Horizontal scaling
 Very slow deployment
 The most significant advantage of the monolithic architecture is its simplicity.
 In comparison to distributed applications of various genres, monolithic ones are much easier to test, deploy, debug
and monitor.
Architecture Highlights (Classic Three Tier Model)
 User interface code (typically HTML pages and
JavaScript running in a browser on the user’s
machine);
 Server-side business logic which handles HTTP
requests, executes domain logic, retrieves and
updates data from the database, and selects and
populates HTML views to be sent to the browser
 The server-side application is a monolith - a single
logical executable.
 A monolithic application runs as a single process in
the application server’s environment.
 Database backend All data is retained in one
database with no need for its synchronization; all
internal communication is done via intra-process
mechanisms.
 Hence it is fast and does not suffer from problems
typical to inter-process communication (IPC)
Strengths & Weaknesses
Strengths Monolithic
Simplicity Monolithic architecture offers a simple and
straightforward development process, making it easier
to understand, build, and maintain.
Ease of Management Since the entire application is bundled together,
deployment and management processes are simpler
compared to managing multiple independent services.
Performance Monolithic architectures can have lower overhead due
to direct method calls, as there is no need for inter-
service communication or network latency.
Testing Testing a monolithic application can be more
manageable, as all components are tightly integrated
and changes can be tested as a whole
Familiarity Monolithic architectures have been around for a long
time, making them familiar to developers and ensuring
a wide pool of resources and support.
Weaknesses Monolithic
Slower development
speed
A large, monolithic application makes development more
complex and slower.
Scalability You can’t scale individual components.
Reliability If there’s an error in any module, it could affect the entire
application’s availability.
Barrier to technology
adoption
Any changes in the framework or language affects the
entire application, making changes often expensive and
time-consuming.
Lack of flexibility A monolith is constrained by the technologies already used
in the monolith
Deployment A small change to a monolithic application requires the
redeployment of the entire monolith.
Monolithic Case Study (SHOPIFY)
Background
 Shopify is a popular e-commerce platform that allows businesses to set up their online stores. It
was founded in 2006, and its initial architecture was monolithic.
 Shopify’s core monolith has over 2.8 million lines of Ruby code and 500,000 commits.
 Over three years ago, Shopify founded a team to investigate how to make our Rails monoliths
more modular. The goal was to help us scale towards ever increasing system capabilities and
complexity by creating smaller, independent units of code we called components.
Monolithic Case Study (SHOPIFY) Architecture
Overview
Monolithic Architecture Overview: In a monolithic architecture, the entire application is built as
a single, tightly integrated unit. In the case of Shopify:
• Single Codebase Shopify started as a monolith, with all its components, including frontend,
backend, and database, part of a single codebase.
• Integrated Functionality All e-commerce features, such as product management, shopping
cart, payment processing, and user authentication, were tightly integrated.
• Scalability within Monolith Shopify's monolithic architecture has scaled with the company's
growth, handling a large number of online stores and transactions.
Monolithic Case Study (SHOPIFY)
Benefits & Success
• Simplicity in Early Stages A monolithic architecture allowed Shopify to build
and deploy quickly during its early stages.
• Single Codebase Management Managing a single codebase can simplify
development and deployment processes, particularly when the application is not
too large.
• Ease of Debugging and troubleshooting can be straightforward as all components
are part of the same codebase.
• Consistent Performance Since all components are tightly integrated,
performance can be consistent across the application.
Challenges and Adaptations:
• Scaling Challenges While Shopify
initially scaled within the monolithic
architecture, the company eventually
faced challenges related to scalability.
• Maintainability As the platform grew,
maintaining and innovating within the
monolith became more challenging.
Monolithic Case Study (SHOPIFY)
Ongoing Evaluation
Shopify has adapted to the challenges of its growth by introducing more
modular practices within its monolithic architecture. While the core
system remains monolithic, they have implemented techniques to isolate
and modularize components, improving maintainability and allowing for
more flexibility in development.
A High-Level Comparison & Highlights
of Monolithic and Microservice Architecture
Characteristic Monolithic Microservices
Scalability scaling requires replicating the entire application, which can be resource-intensive
and inefficient, hence difficult and costly to scale up the application features.
scale only those services that require more resources, making it a more efficient and cost-
effective solution, hence provide easiness of scalability in application features
Maintainability  Provide easiness to develop, test, and deploy, but not easy to maintain, scale,
and enhance.
 May suffer from single point of failure.
 Monolithic architecture may require more extensive testing and deployment
cycles.
 Need more resources and specialized skills to develop, but they are easier to debug,
maintain, enhance, and scale.
 Micro services do not suffer from a single point of failure
 Microservices facilitate faster deployment and independent scaling
Performance  on a single machine, a monolith performs better than its microservice-based
counterpart.
 A monolithic architecture seems to be a better choice for simple, small-sized
systems that do not have to support a large number of concurrent users.
 scaling out beyond a certain number of instances degrades the application
performance
 On a single machine the performance is degraded as it need more parallel
computational power.
 a microservice architecture is not the best suited for every context.
 Scaling does not degrades the performance.
Development
Complexity
 Complex to develop a single code with multiple developers or assigned single
developer to developed complete code is time taking job.
 Monolithic architecture provides simplicity and ease of management.
 Monolithic architecture relies on a single technology stack.
 Provide easiness to handle development complexity as there is a provision to develop
the modules independently in a distributed development environment to handle large
scale product development.
 Microservices promote flexibility and agility in development
 Microservices allow for technological diversity

Comparative Analysis of Software Architectures.pptx

  • 1.
    Comparative Analysis ofSoftware Architectures Monolithic vs Microservices FALL Semester 2023 Department of Software Engineering (COURSE TITLE: SE-6102 – Adv. Software System Architecture) Sir Syed University of Engineering & Technology Group Members M.Faisal Riaz Bilgrmai (2023F-MSE-008) Khuram Mawani (2023F-MCS-007) Muhammad Salman (2023F-MSE-011)
  • 2.
    Brief Overview ofMicroservices • Microservices a combination of multiple small scale and self-sufficient modules. • Each module or service functioned as a single business entity and work independently. • Support Agility, Scalability and Versatile Management. • Micro service architecture become a popular choice for large scale application .
  • 3.
    Characteristics Microservices  UsesAPIs to communicate between Services interaction  Database of each service could be independent  Each and every service or module is independent  Scalability available at the individual level  Supports vertical scaling.  Focused on a single business outcome  The architecture provides isolation in modules  Management and monitoring of each service is different Conceptual Diagram of Micro-Services
  • 4.
    Architecture Highlights  Implementationlogic, architecture, and technologies (including programming language, database, etc.) are completely hidden behind the API.  Microservices communicate with each other using well-standardized lightweight internet protocols, such as HTTP and REST, or messaging protocols, such as JMS or AMQP.  Splitting large applications into individual microservices provides the next degree of independence to agile teams which supports scaling agile methods.  The microservice applications is loosely coupled architecture makes them more fault tolerant – the failure of one component does not necessarily result in the unavailability of the whole system.
  • 5.
    Strength & Weakness StrengthsMicro service Scalability Microservices architecture allows individual services to scale independently, enabling efficient resource utilization and accommodating varying workloads. Flexibility Each microservice can be developed and deployed independently, facilitating rapid development cycles and reducing time-to-market. Fault Isolation Since microservices operate independently, a failure in one service does not impact the entire system, ensuring fault isolation and resilience Technology Diversity Microservices allow different services to use different technology stacks, enabling organizations to choose the best tools and frameworks for each specific task. Team Autonomy Microservices promote decentralized development and autonomous teams, fostering agility and innovation within an organization. Weaknesses Micro services Development sprawl Microservices add more complexity compared to a monolith architecture, since there are more services in more places created by multiple teams. If development sprawl isn’t properly managed, it results in slower development speed and poor operational performance Exponential infrastructure costs Each new microservice can have its own cost for test suite, deployment playbooks, hosting infrastructure, monitoring tools, and more. Added organizational overhead Teams need to add another level of communication and collaboration to coordinate updates and interfaces. Debugging challenges Each microservice has its own set of logs, which makes debugging more complicated. Plus, a single business process can run across multiple machines, further complicating debugging. Lack of standardization Without a common platform, there can be a proliferation of languages, logging standards, and monitoring. Lack of clear ownership As more services are introduced, so are the number of teams running those services. Over time it becomes difficult to know the available services a team can leverage and who to contact for support.
  • 6.
    Case Study (NETFLIX)Background  Netflix is one of the prominent case study that successfully transformed from a traditional monolithic to cloud based micro services architecture.  Netflix is the pioneer successfully deployed the micro services model pragmatically and introduced OSS (Open Source Software Center) has a lot of tools and technologies which can be used by other companies to create micro service architecture on the cloud.  Netflix managed to split its single monolithic application into hundreds of small loosely coupled services. Today Netflix has over a 1000 microservices, each managing a separate part of the site.  The migration process began in 2009. It started out by moving movie encoding, a noncustomer facing application.  By 2010 Netflix started moving the remaining pieces to the cloud such as account signup, movie selections, and other configurations  By December 2011, Netflix had successfully migrated its entire operation to the cloud – from a monolithic to a then-unknown territory of micro service architecture.
  • 7.
    Case Study (NETFLIX)Key Micro services • User Management o Responsible for user authentication, authorization, and profile management. o Enables features like multiple user profiles per account. • Content Delivery o Manages the distribution of content to users. o Handles video transcoding, streaming, and content delivery based on user location and device. • Recommendation Engine o Analyzes user viewing habits and preferences. o Provides personalized content recommendations to improve user engagement. • Billing and Subscription o Manages user subscriptions and billing information. o Integrates with payment gateways for secure transactions. • Search and Discovery o Enables users to search for content efficiently. o Manages metadata and indexing for quick content discovery. • Analytics and Monitoring o Monitors system health, user behavior, and performance. o Provides insights for continuous improvement and resource optimization.
  • 8.
    Case Study (NETFLIX)Benefits & Challenges Benefits • Scalability o Each micro service can be scaled independently based on demand. • Flexibility and Agility o Enables rapid development and deployment of new features. o Teams can work independently on different micro services. • Fault Isolation o Isolates failures to specific micro services, preventing cascading failures. • Improved Performance o Optimizes performance by allowing the use of different technologies for specific tasks. • Continuous Deployment o Facilitates continuous integration and deployment of updates without affecting the entire system. • Enhanced Resilience o Redundancy and failover mechanisms in place to ensure service availability. Challenges • Complexity o Managing a large number of micro services requires sophisticated orchestration and monitoring. • Data Consistency o Ensuring consistency across distributed data stores can be challenging. • Communication Overhead o Increased communication between microservices can lead to network latency. • Security o Security concerns such as data protection and secure communication must be addressed.
  • 9.
    Case Study (NETFLIX)Conclusion 1. In conclusion, Netflix's adoption of a micro services architecture has played a crucial role in its ability to scale, innovate, and deliver a seamless streaming experience to its global user base. 2. The approach has its challenges, but the benefits in terms of scalability, flexibility, and agility outweigh the complexities for a platform of Netflix's scale.
  • 10.
    Brief Overview ofMonolithic Architecture • An approach in which all components in an application are connected in a single unit. • There are no isolated modules or services, separate codebases, or separate databases • The deployment in the monolithic application generally varies by each application. • The management of the monolithic application is also very easy. • The monolithic approach seems to work well small scale applications.
  • 11.
    Characteristics Monolithic Architecture The monolithic approach is a natural and first-choice approach to building an application – all logic for handling requests runs in a single process. A single codebase and self-contained application.  Tightly coupled modules  Utilize single technology stack  Horizontal scaling  Very slow deployment  The most significant advantage of the monolithic architecture is its simplicity.  In comparison to distributed applications of various genres, monolithic ones are much easier to test, deploy, debug and monitor.
  • 12.
    Architecture Highlights (ClassicThree Tier Model)  User interface code (typically HTML pages and JavaScript running in a browser on the user’s machine);  Server-side business logic which handles HTTP requests, executes domain logic, retrieves and updates data from the database, and selects and populates HTML views to be sent to the browser  The server-side application is a monolith - a single logical executable.  A monolithic application runs as a single process in the application server’s environment.  Database backend All data is retained in one database with no need for its synchronization; all internal communication is done via intra-process mechanisms.  Hence it is fast and does not suffer from problems typical to inter-process communication (IPC)
  • 13.
    Strengths & Weaknesses StrengthsMonolithic Simplicity Monolithic architecture offers a simple and straightforward development process, making it easier to understand, build, and maintain. Ease of Management Since the entire application is bundled together, deployment and management processes are simpler compared to managing multiple independent services. Performance Monolithic architectures can have lower overhead due to direct method calls, as there is no need for inter- service communication or network latency. Testing Testing a monolithic application can be more manageable, as all components are tightly integrated and changes can be tested as a whole Familiarity Monolithic architectures have been around for a long time, making them familiar to developers and ensuring a wide pool of resources and support. Weaknesses Monolithic Slower development speed A large, monolithic application makes development more complex and slower. Scalability You can’t scale individual components. Reliability If there’s an error in any module, it could affect the entire application’s availability. Barrier to technology adoption Any changes in the framework or language affects the entire application, making changes often expensive and time-consuming. Lack of flexibility A monolith is constrained by the technologies already used in the monolith Deployment A small change to a monolithic application requires the redeployment of the entire monolith.
  • 14.
    Monolithic Case Study(SHOPIFY) Background  Shopify is a popular e-commerce platform that allows businesses to set up their online stores. It was founded in 2006, and its initial architecture was monolithic.  Shopify’s core monolith has over 2.8 million lines of Ruby code and 500,000 commits.  Over three years ago, Shopify founded a team to investigate how to make our Rails monoliths more modular. The goal was to help us scale towards ever increasing system capabilities and complexity by creating smaller, independent units of code we called components.
  • 15.
    Monolithic Case Study(SHOPIFY) Architecture Overview Monolithic Architecture Overview: In a monolithic architecture, the entire application is built as a single, tightly integrated unit. In the case of Shopify: • Single Codebase Shopify started as a monolith, with all its components, including frontend, backend, and database, part of a single codebase. • Integrated Functionality All e-commerce features, such as product management, shopping cart, payment processing, and user authentication, were tightly integrated. • Scalability within Monolith Shopify's monolithic architecture has scaled with the company's growth, handling a large number of online stores and transactions.
  • 16.
    Monolithic Case Study(SHOPIFY) Benefits & Success • Simplicity in Early Stages A monolithic architecture allowed Shopify to build and deploy quickly during its early stages. • Single Codebase Management Managing a single codebase can simplify development and deployment processes, particularly when the application is not too large. • Ease of Debugging and troubleshooting can be straightforward as all components are part of the same codebase. • Consistent Performance Since all components are tightly integrated, performance can be consistent across the application. Challenges and Adaptations: • Scaling Challenges While Shopify initially scaled within the monolithic architecture, the company eventually faced challenges related to scalability. • Maintainability As the platform grew, maintaining and innovating within the monolith became more challenging.
  • 17.
    Monolithic Case Study(SHOPIFY) Ongoing Evaluation Shopify has adapted to the challenges of its growth by introducing more modular practices within its monolithic architecture. While the core system remains monolithic, they have implemented techniques to isolate and modularize components, improving maintainability and allowing for more flexibility in development.
  • 18.
    A High-Level Comparison& Highlights of Monolithic and Microservice Architecture Characteristic Monolithic Microservices Scalability scaling requires replicating the entire application, which can be resource-intensive and inefficient, hence difficult and costly to scale up the application features. scale only those services that require more resources, making it a more efficient and cost- effective solution, hence provide easiness of scalability in application features Maintainability  Provide easiness to develop, test, and deploy, but not easy to maintain, scale, and enhance.  May suffer from single point of failure.  Monolithic architecture may require more extensive testing and deployment cycles.  Need more resources and specialized skills to develop, but they are easier to debug, maintain, enhance, and scale.  Micro services do not suffer from a single point of failure  Microservices facilitate faster deployment and independent scaling Performance  on a single machine, a monolith performs better than its microservice-based counterpart.  A monolithic architecture seems to be a better choice for simple, small-sized systems that do not have to support a large number of concurrent users.  scaling out beyond a certain number of instances degrades the application performance  On a single machine the performance is degraded as it need more parallel computational power.  a microservice architecture is not the best suited for every context.  Scaling does not degrades the performance. Development Complexity  Complex to develop a single code with multiple developers or assigned single developer to developed complete code is time taking job.  Monolithic architecture provides simplicity and ease of management.  Monolithic architecture relies on a single technology stack.  Provide easiness to handle development complexity as there is a provision to develop the modules independently in a distributed development environment to handle large scale product development.  Microservices promote flexibility and agility in development  Microservices allow for technological diversity