Software Architecture Books Summary And Highlights -- Part 10 Scaling

 

Scaling

Highlights

Ways to scale up business model integration:

  • Open host service

    When a subsystem has to be integrated with many others , customizing a translator for each can bog down the team.

    • Define a shared protocol with shared a shared domain language
    • Use a one-off translator to augment the protocol for that special case so that the shared protocol can stay simple and coherent.
  • Published Language

    • Use a well-documented shared language that can express the necessary domain information as a common medium of communication, translating as necessary into and out of that language.

DDD ch 14 Maintaining Model Integrity


Large scale domain model

  • evolving order
    • Too complicated and restrictive architecture based on up-front design assumption could prohibit developers from switching to better architecture based on better domain model.
    • Don’t overconstrain the detailed design and model decisions that must be made with detailed knowledge.
    • Let this conceptual large- scale structure evolve with the application, possibly changing to a completely different type of structure along the way.
  • System Metaphor
    • Use analogy to help develops and users understand the domain model
    • Organize the design around this metaphor and absorb it into the UBIQUITOUS LANGUAGE.
  • responsibility layer: Divide the domain model into multiple conceptual layers. Example


  • knowledge level
    • a meta rule level which describes and constrain the structure and behavior of the basic model.
    • like reflection pattern in ood
  • Pluggable Component Framework
    • Distill an ABSTRACT CORE of interfaces and interactions and create a framework that allows diverse implementations of those interfaces to be freely substituted.
  • How Restrictive Should a Structure Be?
    • The more restrictive, the less flexible.
    • Each structural rule should make development easier.

DDD ch 16 Large-Scale Structure


MicroService Scaling:

Goal: reduce failures and improve performance

approach:

  1. vertical scaling
  2. splitting workload: split critical service with low priority service so that critical service can have more resources
  3. splitting risk
    1. deploy your services to different hardwares and data centers . don’t put all services on same server
    2. because cloud providers give you an SLA guarantee, they will tend to limit their liability!
  4. load balancer
    1. some offers ssl termination which transforms https to http
    2. prefer software load balancer over hardware load balancer because it is easy to automate
  5. worker based system
    1. a collection of instances all work on some shared backlog of work. e.g. hadoop
  6. starting again
    1. redesign your service for large load
    2. design for ~10× growth, but plan to rewrite before ~100×

MSV Ch 11 Microservices at Scale


Service mesh:

common microservice communication infra containing observability, security, and reliability features so that it is easy to improve performance.

MSV Ch 11 Microservices at Scale


Caching

  1. Client caching: e.g. CDN
    1. pros: drastically reduce network traffic to server
    2. cons: hard to invalidate and update cache
  2. Proxy caching: a cache layer between server and client
    1. pros: handle multiple services, generic cache,
    2. cons: one more layer of network hops though not big impact
  3. Server caching:
    1. pros: easier to control and invalidate

Usually a mix of the 3 caches

Caching can be very powerful indeed, but you need to understand the full path of data that is cached from source to destination to really appreciate its complexities and what can go wrong.

MSV Ch 11 Microservices at Scale

A key lesson for Google production infrastructure has been to provision the cache to meet your latency goals, but provision the core application for the total load. This has allowed us to avoid outages when the cache layer was lost because the noncached path was provisioned to handle the total load (although with higher latency).

SWG Ch 25 compute as a service


Related Chapters

DDD ch 14 Maintaining Model Integrity

DDD ch 16 Large-Scale Structure

SAP Ch 9 performance

MSV Ch 11 Microservices at Scale

SWG Ch 25 compute as a service

Popular posts from this blog

Does Free Consciousness exist ?

View and Build Government Organization like a Software

Software Architecture Books Summary And Highlights -- Part 1 Goal, Introduction And Index