Practical Microservices: nuts and bolts (architecture to implementation)

Microservice architectures break up monolithic server-side applications into a system of small cooperative independent actors. Microservice systems have unique challenges – they must be designed in a domain-focused way to be maintainable, and building them is not as easy as one might think, given that they must be secure, very lightweight, platform neutral, language independent, and independently deployable.

Your service system must be built around appropriate logical and physical architectures and technology, or you will lose all the benefits. There’s a lot of ‘devil in the details’.

This class is a deep dive into all aspects of microservice design and implementation. You’ll learn how to design microservice systems that are easy to maintain and deploy. You’ll learn the real-world issues of implementing services on a lightweight messaging framework, and accessing those services securely over a web portal. The focus is on the practical, with particular emphasis on decoupling services from each other and eliminating single points of failure (like brokers and centralized discovery/scaling).

This is an architecture class, but we’ll look at a lot of code as well.

What you’ll learn

  • You’ll understand exactly what a microservice is and how to build one
  • You’ll learn about various approaches to service architectures, both orchestrated and choreographed
  • You’ll learn how to design effective service-based architectures around your problem domain
  • You’ll learn how to get large clouds of cooperating services to interact effectively and reliably
  • You’ll learn the real-world issues surrounding service construction and deployment
  • You’ll learn the pitfalls of microservice-based systems and how to correct for them


There will be several code examples in C#, so a reading understanding of that or a similar language (Java, C++, Swift) will be helpful.

Day 1

What is a Microservice?
Characteristics of a microservice; the good, the bad, and the ugly; Agile and other volatile-requirements environments; impact on the development organization and processes; testing difficulties and deployment strategies; moving from the monolith; Conway’s law; how architecture impacts the organization.

Logical architecture
Mini, micro, or nano; reactive services vs. objects; domain-focused architecture & DDD; essential design principles and patterns; responsibility-based design; bounded contexts; implementation hiding; Active Object (actor); eventual consistency; statelessness; incremental design and development; going from stories to code.

Hands-on exercise: logical architecture

Day 2

Hands-on exercise: logical architecture (continued).

Physical architecture
Essential patterns (single-method cloud services, reactive, proxy, router mesh, fabric); inappropriate infrastructure (languages etc.); interfacing to the outside world; communications infrastructure and messaging; UI architectures (Presentation/Abstraction/Control)

Inter-service communication
REST-less communication; lightweight messaging; ZeroMQ compared to Rabbit and Kafka; PubSub vs push/pull; Brokerless, point-to-point communication

Orchestrated systems
Containers (Docker); UCP, DDC, DCR

Choreographed systems
Eliminating single points of failure; service swarms (decentralized self-scaling fabrics); emergence; decentralized discovery (registries) and scaling; startup (cloning); shutdown; hot updates

Hands-on exercise (time permitting): building a messaging-based service.

Day 3

Heartbeating; monitoring; circuit breakers; bulkheads; testing vs alarms

User; inter-service; every service is an attack surface; service-specific attacks

Deployment and platforms
Service independence; VMs, Amazon EC2, Lambda; AWS containers; Azure Container Services; Azure Service Fabric

Allen Holub

Allen Holub

Allen is a world-class expert in Agile process, software architecture, and OO design. He's built full-stack web applications, Microservices, compilers, database servers, real-time operating systems, and more. He provides guidance and training for all sizes of organizations, working with everyone from C-levels to developers. Allen has also written a number of books (including Holub on Patterns) and hundreds of technical articles, and has taught for the University of California Berkeley Extension.

Follow Allen on Twitter