Software Engineer Handbook
  • 👋Welcome to this handbook
  • Level 0 : Non-technical considerations
    • How to manage your time effectively
    • How to prepare for job interviews #1 : Digital Presence
    • How to prepare for job interviews #2 : At the interview
  • Level 1 : Computer Science
    • Intro: Why computer science is critical
    • Algorithms & Data structures Handbook
      • Algorithms & Data structures Handbook
      • Sorting Algorithms
      • Data Structures ADTs Implementation (In Go)
      • Techniques for Solving Data Structures Problems
    • Computer Organization and Architecture
    • Operating Systems
    • Database systems
  • Level 2 : System Design
    • Step 1 : Analysis
    • Step 2 : Digging deeper into data modeling
    • Step 3 : High-Level component design
    • Step 4: Low-Level / Detailed Design system
      • Clients
      • Application Servers
      • Databases
      • Security
      • Distributed Systems with Microservices
  • Level 4: Productivity Handbook for Software Engineers
    • How I use Fig
    • Command line tools
    • Develop on the cloud
  • Extra
  • Leadership
    • Processes
    • Poeple
    • Delivery
    • Transitioning to a new role
    • Resources I like
Powered by GitBook
On this page
  • Going to microservices checklist ✅
  • Challenges of microservices that you should consider
  • Designing phase 🎨
  • Implementing a microservice
  • Communication
  • API Gateway
  • Refs
  1. Level 2 : System Design
  2. Step 4: Low-Level / Detailed Design system

Distributed Systems with Microservices

Going to microservices checklist ✅

  • Volume: the volume of activities outgrow the current technology stack

  • New features: better new technologies for certain new features (Using python for example for a report/analytics microservice)

  • Engineering team growth: lines of communication increased, the source code is becoming bigger, the cognitive load of an engineer is increasing which slows down the process of developing and maintaining source code (more on that later)

  • Technical debt: debt from previous build decision, now it's becoming difficult to make changes

  • Distributed system for distributed team: promoting end-to-end ownership for small set of teams with different responsibilities where each team is responsible for it own development and deployment line (frequent small releases by each team rather than a 1 big deployment release), and they communicate through defined contracts and documentation

Challenges of microservices that you should consider

  • Domain knowledge

  • Maintaining contracts

  • Distributed system challenges

  • Operational challenges

  • Observability

  • Increase points of failure

Designing phase 🎨

  1. Implement most meaningful separation using bounded context

  2. Design functions inside capability

  3. Implement service contracts

  4. Standardize the development, automate, and deployment processes

Implementing a microservice

Communication

  • Asynchronous communication

    • Multiple receivers / Fun-out / Pub-Sub (NATS, Kafka, Kinesis)

    • Single Receiver (using NATS broker or without broker)

      • Point to point (subject-based using NATS for example)

      • HTTP pooling

  • Synchronous communication

    • Single Receiver

      • HTTP REST

      • gRPC

    • Multiple Receivers

      • Web-hooks

API Gateway

Use cases

  • Authentication and authorization

  • Service discovery integration

  • Response caching

  • Retry policies, circuit breaker, and QoS

  • Rate limiting and throttling

  • Load balancing

  • Logging, tracing, correlation

  • Headers, query strings, and claims transformation

  • IP allow listing

Refs

PreviousSecurityNextLevel 4: Productivity Handbook for Software Engineers

Last updated 2 years ago

ACID distributed Transactions in microservices :

https://developers.redhat.com/blog/2018/10/01/patterns-for-distributed-transactions-within-a-microservices-architecture
The API gateway pattern versus the direct client-to-microservice communicationdocsmsft
Logo
Asynchronous Request-Reply Pattern - Azure Architecture Centerdocsmsft
how client cope with async microservices ?
Logo
This has nothing to do with microservices but the challenges of distributed systems