Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
136 lines (92 sloc) 2.95 KB

Software Architectures

Monolothic

Notes:

  • A company may have more than one monolith
  • A monolith means a big heavy app

Pros:

  • Knowledge Sharing
  • Easier dependency management
  • Easier version management
  • Easier to track breakages across different projects
  • Easier to know what team is doing at a glance

Cons:

  • Harder to split code ownership
  • Harder to define responsibilities
  • Monolithic codebases can easily become a mess
    • No strong conventions
    • Can be harder to deploy
  • Increased complexity on codebase
  • Harder to distinguish responsibility of the codebase

Examples:

  • Facebook
    • Only WWW is a monolithic app

Resources:

Questions:

  • When should you break down a monolithic app?
  • When should you unbundle a monolith?

Non-Monolothic

Examples:

  • Amazon
    • Lots of data duplication

Common in:

  • Microservices (typically)
  • FaaS / Serverless

Microservices

Pros:

  • Lighter weight deployments

Cons:

  • Many repositories
    • Complex
  • Poor knowledge sharing
  • Orchestration

Requires:

  • Service Discovery
  • Event Bus
    • Pub/Sub

Good for:

When to use microservices?

  • Reusable functionality across different services
    • Can exist as a library; or micro service
  • Isolate small piece of code for:
    • Improved quality
    • Predictable releases
    • Security
  • When you want to create a black box
  • Reduce transparency
  • If it can exist as it’s own product
  • Things which can’t exist in a FaaS

Questions to ask:

  • When should you bundle a microservice?
  • When should you unbundle a microservice?
  • When should you break down a monolothic app into a microservice?
  • When does a microservice become a monolithic app?
  • If your goal is to keep it as a Single Responsiblity Principle
    • Why not just use a FaaS architecture?

FaaS (Functions as a Service) / Serverless

Pros:

  • DevOps is not required
  • Reduce security footprint
  • Isolated
  • Pay for what you use

Cons:

  • Harder debugging
  • Increased complexity on infrastructure

Good for:

  • Teams with poor devops

When to use FaaS?

  • Unpredictable demands
    • Competing faaa products (Ec2) can leveraged auto scaling
  • Small work loads that don’t require an always on machine
  • Isolated processes

Examples:

You can’t perform that action at this time.