Python Classroom notes 17/May/2025

Microservices

  • Consider an ecommerce application which is designed as shown below
  • Components
    • Web-Store:
      • This is front end application that caters to browser requests
      • This application requests to the backend Ecommerce APIs for business logic
      • Technologies:
        • ReactJs
        • Angular JS
        • VueJs
    • E-Commerce APIs:
      • This is backend application which responds to API calls that serve business logic
      • This application can be communicated from Web-Store and Mobile APPS
      • Technologies:
        • Python:
          • FastAPI
          • Flask
          • Django Restful
        • Java:
          • Spring boot
        • Dotnet:
          • Asp.net core web apis
    • Mobile App:
      • This is thick client which can be installed on smartphones
      • Technologies
        • Andriod:
          • Kotlin
        • IOS:
          • Swift
    • Database:
      • This can be any Relational database
      • Options:
        • Postgres
        • mySQL
        • Oracle
        • SQL Server
  • Deployment Options
    • Physical/Virtual Machines:
      • Each component can be run on a different server (physical/virtual)
      • We need to scaling setup for High Availability
    • Cloud Based PaaS Models: Cloud offers PaaS (Platform as a Service)

Microservices: Definition and Key Concepts

Microservices is an architectural approach to software development where an application is structured as a collection of small, independent services, each responsible for a specific business function or capability[1][2][4][6]. Unlike traditional monolithic architectures, where all features and logic are tightly integrated into a single codebase, microservices break down the application into modular components that can be developed, deployed, and scaled independently[1][2][5][6].

Core Characteristics

  • Independence: Each microservice runs its own process and typically manages its own data, allowing for independent development, deployment, and scaling[2][4][5][6].
  • Specialization: Each service is designed around a specific business capability or function, such as user authentication, payment processing, or inventory management[1][2][4][7].
  • Loose Coupling: Services interact with each other through well-defined interfaces, usually via lightweight APIs (such as REST or messaging protocols), minimizing dependencies between them[2][5][6][7].
  • Autonomous Teams: Microservices are often owned and managed by small, cross-functional teams, enabling faster development cycles and innovation[2][1].
  • Technology Agnostic: Teams can use different programming languages, databases, or frameworks for each service, choosing the best tool for each job[2][6].

How Microservices Work

  • Each microservice is self-contained, handling a distinct task or business requirement[5][6].
  • Services communicate over a network using lightweight protocols (HTTP, REST, messaging), often coordinated via an API gateway that manages requests, security, and load balancing[5].
  • Microservices are commonly deployed using containers, which encapsulate the service and its dependencies, making it easier to manage and scale in cloud environments[4][5].
  • The architecture supports automation and orchestration for deployment and scaling, often leveraging DevOps practices and continuous delivery pipelines[2][6].

Advantages

  • Scalability: Individual services can be scaled independently based on demand, optimizing resource usage and cost[2][4][6].
  • Resilience: Failure in one service does not necessarily impact others, enhancing overall system reliability[5][6].
  • Agility: Teams can update, deploy, or roll back services without affecting the entire application, accelerating time-to-market for new features[2][7].
  • Flexibility: The modular nature allows for easier experimentation, adoption of new technologies, and reuse of services across different applications[2][6].

Challenges

  • Complexity: Managing a distributed system of many services introduces challenges in monitoring, debugging, and maintaining inter-service communication[6].
  • Operational Overhead: Requires robust automation, orchestration, and monitoring tools to manage deployment, scaling, and fault tolerance[5][6].

Typical Use Cases

Microservices are widely adopted in cloud-native applications and by organizations seeking to build scalable, resilient, and rapidly evolving systems. Leading technology companies like Amazon, Netflix, and Uber have transitioned from monolithic architectures to microservices to support their growth and innovation needs[1][2][4].


In summary, microservices architecture enables building modern, scalable, and flexible applications by decomposing them into loosely coupled, independently deployable services, each focused on a specific business function[1][2][4][6].

Citations:
[1] https://www.spiceworks.com/tech/devops/articles/what-are-microservices/
[2] https://aws.amazon.com/microservices/
[3] https://microservices.io
[4] https://cloud.google.com/learn/what-is-microservices-architecture
[5] https://www.techtarget.com/searchapparchitecture/definition/microservices
[6] https://en.wikipedia.org/wiki/Microservices
[7] https://www.paloaltonetworks.com/cyberpedia/what-are-microservices
[8] https://www.atlassian.com/microservices
[9] https://www.vmware.com/topics/microservices

  • Microservices


Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%