Skip to content
StackPractices

Tag: microservices

Browse 38 practical software engineering resources tagged with "microservices". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving microservices.

Go REST API with Gin and Middleware

Build production-ready REST APIs in Go using the Gin framework with custom middleware for logging, authentication, validation, and error handling

Implement a gRPC API with Protocol Buffers

How to implement a gRPC API using Protocol Buffers for high-performance service-to-service communication

gRPC Services with Protocol Buffers in TypeScript

Build high-performance, strongly-typed services using gRPC with Protocol Buffers, covering unary calls, server streaming, client streaming, and bidirectional streaming

Microservices Communication Patterns

Choose between synchronous and asynchronous communication patterns for resilient microservices architectures.

Service Discovery

Implement service discovery with health checks, DNS-based resolution, and service registries for live microservices environments.

Local Microservices Development with Docker Compose

Orchestrate multi-service local environments with Docker Compose including databases, caches, message brokers, and reverse proxies with hot reload and shared networks

Set Up a GraphQL Federation Gateway with Apollo

Compose multiple GraphQL services into a single federated supergraph using Apollo Federation and a gateway that routes queries across subgraphs

Event-Driven Microservices

Design event-driven microservices with message brokers, event sourcing, CQRS, and eventual consistency patterns.

Event Streaming with Apache Kafka and Node.js

Build growth-ready event-driven systems using Apache Kafka with producers, consumers, consumer groups, and exactly-once semantics for reliable asynchronous messaging

Task Queues and RPC with RabbitMQ and AMQP

Implement reliable task distribution and request-reply patterns using RabbitMQ with durable queues, dead-letter exchanges, and prefetch for controlled concurrency

Distributed Tracing

Trace requests across distributed microservices with OpenTelemetry, Jaeger, and Zipkin for latency debugging and performance optimization.

Backends for Frontends: Dedicated Backend per Client Type

How to create dedicated backends per client type. Covers BFF for web, mobile, and desktop. Covers API aggregation, client-specific optimization, and GraphQL BFF.

Gateway Routing Pattern

Route requests to multiple backend services through a single entry point that handles cross-cutting concerns.

Health Endpoint Monitoring Pattern

Expose lightweight health endpoints so orchestrators, load balancers, and monitoring tools can verify service availability.

Ambassador Pattern for Resilient Remote Service Access

Add a local ambassador that handles retries, circuit breaking, and monitoring when calling remote services, keeping the client simple and the service logic pure

Circuit Breaker Pattern

Prevent cascading failures by stopping requests to failing services. An architectural pattern for resilient distributed systems.

Database per Service Pattern

Give each microservice its own private database to ensure loose coupling, independent deployment, and technology heterogeneity across the application portfolio.

Event-Carried State Transfer Pattern

Replicate state changes across services by publishing events that carry the full updated entity state, enabling consumers to maintain their own local copies without querying the source.

Outbox Pattern

Reliably publish domain events by persisting them in an outbox table within the same database transaction as the business operation.

Saga Pattern

Manage distributed transactions across multiple services by chaining local transactions with compensating actions for rollbacks. A microservices pattern.

GraphQL Federated Entity Pattern

Share entity types across federated GraphQL services so the gateway can resolve fields from multiple subgraphs transparently.

Correlation ID: Trace Requests Across Distributed Services

How to propagate correlation IDs across service boundaries for end-to-end request tracing. Covers HTTP headers, message queues, and logging integration.

Contract Testing: Verify Consumer-Producer API Contracts

How to use contract testing to verify that API producers and consumers agree on request and response shapes. Covers Pact consumer-driven contracts and provider verification.

Microservice Contract Template

A template for defining service contracts and API agreements between microservices.

Service Dependency Map Template

A template for documenting and visualizing service dependencies in distributed systems.

Service Ownership Document Template

A template for defining who owns a service, what it does, how to operate it, and where to find critical information when things go wrong.

GraphQL Federation Onboarding Template

Template for onboarding a service to a federated GraphQL graph: subgraph setup, entity definitions, resolver configuration, gateway integration, testing, deployment, and monitoring with code examples.

Complete Guide to GraphQL Federation

Build unified GraphQL APIs across multiple services with Apollo Federation. Covers subgraphs, supergraph composition, entity resolution, and gateway deployment.

API Gateway Design: Resilience, Routing, and Security

A practical guide to designing API gateways: routing patterns, rate limiting, authentication, circuit breakers, and observability for resilient APIs.

API Gateway: Routing, Auth, Rate Limiting

Master API gateway architecture: request routing, authentication, rate limiting, request shaping, response caching, protocol translation, and production deployment patterns.

Complete Guide to Microservices Communication

Compare sync vs async communication patterns for microservices. Covers REST, gRPC, message queues, event-driven, service mesh, and when to use each.

Modular Monolith: Module Boundaries, Shared Kernel

Master modular monolith architecture: module boundaries, shared kernel, dependency rules, communication patterns, and incremental migration to microservices.

gRPC in Microservices — High-Performance RPC Guide

A practical guide to gRPC for microservices: Protocol Buffers, streaming, load balancing, and migration from REST for high-performance RPC.

Microservices Architecture — When to Use and When Not To

A practical guide to microservices: benefits, trade-offs, common patterns, and when to choose them over monoliths. Covers decomposition strategies and operational complexity.

Modular Monolith — A Pragmatic Architecture

A practical guide to Modular Monoliths: combine the simplicity of monoliths with the modularity of microservices through clear bounded contexts and strict module boundaries.

Monolith to Microservices — Migration Strategies

A practical guide to decomposing monoliths: strangler fig, branch by abstraction, and incremental extraction patterns that reduce risk and preserve business continuity.

Software Architecture Guide

A guide to designing software architecture: monoliths vs microservices, layered architecture, data flow, and technology selection criteria.

Distributed Tracing: End-to-End Request Flow Across

A practical guide to distributed tracing: instrumenting applications, trace propagation, sampling strategies, and diagnosing latency in microservice architectures with OpenTelemetry, Jaeger, and Zipkin.