docs
  • Overview
  • 🐍 PYTHON
    • Type Hints
    • PEP8 Style Guide for Python Code
    • 🏡Pipenv
    • Pathlib
  • 🕸Django
    • 🗄models
      • 🎯Best Practices
      • 🚦Django Signals
    • ⚙️ settings
    • DRF
      • Serializer
      • Authentication
      • Permissions
      • Viewsets
    • Testing
      • Faker and Factory Boy
    • 🧪Test Coverage
    • 💦Python-Decouple
    • Django Tips:
    • 💾Django ORM Queryset
    • Custom Exceptions
    • Celery
    • Resources
  • Deploy
    • 🚀Django Deployment
    • 🔒Setup SSL Certificate
  • 💾Database
    • MongoDB
  • 🛠️DevOps
    • 🖥Scripting
      • A First Script
      • Loops
      • Test
      • Variables
      • External programs
      • Functions
    • Command Line Shortcuts
    • Basic Linux Commands
    • 🎛Microservices
    • 🐳Docker
      • Docker Commands
      • Docker Compose
      • Django project
    • Kubernates
  • 📝Software IDE
    • EditorConfig
    • Linters
    • VsCode
Powered by GitBook
On this page
  • Monolithic Architecture
  • Benefits of Monolithic Architecture
  • Drawbacks of Monolithic Architecture
  • Microservices Architecture
  • Benefits of Microservices Architecture
  • Drawbacks of Microservices Architecture
  • Summary
  • Resources:

Was this helpful?

  1. DevOps

🎛Microservices

Introduction to Microservices

PreviousBasic Linux CommandsNextDocker

Last updated 5 years ago

Was this helpful?

Monolithic Architecture

Before learn about Microservice let's take a look about monolithic architecture. Monolithic is considered to be a traditional way of building applications. The monolithic approach is a default model for creating a software application. When developing a server-side application with a modular hexagonal or layered architecture which consists of different types of components. Its trend is going down because building a monolithic application poses a number of challenges associated with handling a huge code base, adopting a new technology, scaling, deployment, implementing new changes and others.

Benefits of Monolithic Architecture

  • Simple to develop

  • Simple to deploy

  • Simple to debug and test

  • Simple to scale horizontally

Drawbacks of Monolithic Architecture

  • The size of the application can slow down the start-up time.

  • Application is too large and complex to fully understand and made changes fast and correctly.

  • The size of the application can slow down the start-up time.

  • Continuous deployment is difficult

  • Redeploy the entire application on each update.

  • Another problem with monolithic applications is reliability.

  • Monolithic applications has a barrier to adopting new technologies.

Microservices Architecture

A microservice essentially is when you take instead of having a big monolith application that just does everything and split it up into a handful of other processes. We pick discrete business logic functions say maybe authentication of logging or user management a very specific thing and put it into its own application. Those different micro services can communicate via well-defined APIs usually HTTP. Microservices approach offers tangible benefits including an increase in scalability, flexibility, agility, and other significant advantages. Netflix, Google, Amazon, and other tech leaders have successfully switched from monolithic architecture to microservices.

Key Points:

  • Separate business logic functions

  • Instead of one big program, several smaller applications

  • Communicate via well defined APIs usually HTTP

Benefits of Microservices Architecture

  • Language independent

  • Fault isolation

  • Scalable

  • It enables each service to be developed independently by a team that is focused on that service

  • Fast iterations

  • Pair well with containers

  • Microservice architecture enables each service to be scaled independently

Drawbacks of Microservices Architecture

  • Microservices architecture adding a complexity to the project just by the fact that a microservices application is a distributed system.

  • Deploying a microservices-based application is also more complex

Summary

Building complex applications is inherently difficult. A Monolithic architecture only makes sense for simple, lightweight applications. You will end up in a world of pain if you use it for complex applications. The Microservices architecture pattern is the better choice for complex, evolving applications despite the drawbacks and implementation challenges.

Resources:

  • Introduction-to-microservices

  • Pattern: Microservice Architecture

  • Successful migration to microservices: Why, when, and how

  • Adopting Microservices at Netflix: Lessons for Architectural Design

🛠️
Monolithic Application Design Pattern
Microservice Application Design Pattern