All Projects → testdrivenio → microservices

testdrivenio / microservices

Licence: other
No description or website provided.

Microservices

WIP

Bottom Line

Ideally...

  1. All services are configured programmatically by an API.
  2. Events are the driving force (event-driven, pub/sub model, trigger/action)
  3. Documentation is a first-class citizen.
  4. Live and die with 12-factor
  5. Services should have a single purpose (do one thing and do it well), be loosely coupled (know little about each other), and have high cohesion (encapsulates all related functionality and data together).

APIs, events, and docs!

Big pieces

  1. Application
  2. Pipelines
  3. Platform

microservices-overview

Application

Where the services themselves live...

Big pieces

  1. APIs
  2. Storage
  3. Docs

APIs

  1. Powered by web frameworks (Java/Spring Boot, Python/Flask, Node/Express)
  2. Languages and frameworks don't matter as much as solid API contracts
  3. Single Responsibility (think ls, do one thing and do it well)
  4. 12 Factor
  5. Immutability!!!
  6. Documentation is key - Swagger / OpenAPI spec
  7. How do you handle auth? Do service talk on each other or to a single API Gateway?

Storage

Tools:

  1. Databases (Mongo, Postgres, Redis)
  2. Task Queues
  3. Message Brokers (RabbitMQ, Kafka)

Issues:

  1. Storage is a hard problem.
  2. Containers are ephemeral, data is not.
  3. Do you have a database per service or a shared database?
  4. Disaster recovery? Testing?

Platform

Infrastructure management...

Big Pieces

  1. Software defined networks
  2. Service discovery
  3. Health checks (side cars approach)
  4. Logging
  5. Monitoring
  6. Load balancing
  7. Path-based routing
  8. Circuit breaking

Tools

  1. Kubernetes
  2. Docker Swarm
  3. Mesos
  4. Nomad
  5. Fully-managed: EKS, GKE, ECS
  6. Ubuntus MAAS (metal as a service)
  7. OpenStack

Pipelines

Continuos Integration

Triggers:

  1. Commit to source repo, build and test project
  2. What else?

Tools

  1. Github, GitLab, Git
  2. Jenkins, Travis, Circle
  3. AWS, GCP, Azure
  4. Docker Repos
  5. Linters, static code analysis

Continuous Delivery

Triggers:

  1. On successful build, deploy
  2. What else?

Tools

  1. Shell scripts (yuk!)
  2. Fabric (shell scripts on steroids)
  3. Terraform templates
  4. AWS (CodeDeploy, CodePipeline, CloudFormation), GCP, Azure
  5. Concourse
  6. Spinnaker
  7. Old school (Ansible, Chef, Puppet)

microservices-overview-ci-cd

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].