Skip to main content

Microservices

It is a greater challenge to form a team that works well together than to orchestrate micrservices.

A microservice is a small, loosely coupled, distributed service. It is part of a broader microservices architecture, comprising a set of loosely coupled microservices that operate together to solve a common goal. A collection of microservices can be regarded as a system.

Follow Fred George, he coined the name microservices.

Software architecture matches dynamics of the team that created it - Conway's Law

Benefits

  • Focused domain expertise
  • Pick the right tool for the job

Challenges

  • Deployment strategy for optimal flexibility, cost and efficiency
  • Resilience to failure, meshing
  • Focus on solving domain problems not building infrastructure
  • Leverage serverless platforms with simple code to cloud pipelines
  • Combine multiple languages and frameworks to build a single solution

Why you shouldn't use microservices

Eventual Consistency

Each service owns it's own database, which requires some data duplication which you don't have in a single normalised database. The benefit of data replication is that services are atomic and easier to scale.

tip

Managing data between services is the hardest challenge in creating an MSA solution

Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value.

  • Causal consistency
  • Read-your-writes consistency
  • Session consistency
  • Monotonic read consistency
  • Monotonic write consistency
tip

Data storage is cheap compared to delivering actionable insights

Deployment

  • High Availability
  • Scalability
  • Redundancy

Serverless vs Containerised

Architecture

NameDotNetNest.js
Swagger[x]
RabbitMQx
CQRS[x]
CORS[x]
APIMin. Web API
DTOs[x]
AutomapperAutomapper
Repository[x]
Migrations[x]
Entity Model[x]

Development Environment

Security

Defence in depth, OWASP top 10

  • Encryption
  • Network
  • Monitoring
  • Penetration testing

DotNet Microservices

Legendary effort!

Toolkit

NameNotes
AKS
Helm
Dapr
Bridge to Kubernetes
GitHub ActionsAutomate workflows from idea to production

Resources

Diagram