├── README.md ├── microservices-overview-ci-cd.png └── microservices-overview.png /README.md: -------------------------------------------------------------------------------- 1 | # Microservices 2 | 3 | WIP 4 | 5 | ### Bottom Line 6 | 7 | Ideally... 8 | 9 | 1. All services are configured programmatically by an API. 10 | 1. Events are the driving force ([event-driven](https://martinfowler.com/articles/201701-event-driven.html), [pub/sub model](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern), trigger/action) 11 | 1. Documentation is a first-class citizen. 12 | 1. Live and die with [12-factor](https://12factor.net/) 13 | 1. 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). 14 | 15 | *APIs, events, and docs!* 16 | 17 | ### Big pieces 18 | 19 | 1. Application 20 | 1. Pipelines 21 | 1. Platform 22 | 23 | ![microservices-overview](microservices-overview.png) 24 | 25 | ## Application 26 | 27 | Where the services themselves live... 28 | 29 | ### Big pieces 30 | 31 | 1. APIs 32 | 1. Storage 33 | 1. Docs 34 | 35 | ### APIs 36 | 37 | 1. Powered by web frameworks (Java/Spring Boot, Python/Flask, Node/Express) 38 | 1. Languages and frameworks don't matter as much as solid API contracts 39 | 1. Single Responsibility (think `ls`, do one thing and do it well) 40 | 1. [12 Factor](https://12factor.net/) 41 | 1. Immutability!!! 42 | 1. Documentation is key - Swagger / OpenAPI spec 43 | 1. How do you handle auth? Do service talk on each other or to a single API Gateway? 44 | 45 | ### Storage 46 | 47 | Tools: 48 | 49 | 1. Databases (Mongo, Postgres, Redis) 50 | 1. Task Queues 51 | 1. Message Brokers (RabbitMQ, Kafka) 52 | 53 | Issues: 54 | 55 | 1. Storage is a _hard_ problem. 56 | 1. Containers are ephemeral, data is not. 57 | 1. Do you have a database per service or a shared database? 58 | 1. Disaster recovery? Testing? 59 | 60 | ## Platform 61 | 62 | Infrastructure management... 63 | 64 | ### Big Pieces 65 | 66 | 1. Software defined networks 67 | 1. Service discovery 68 | 1. Health checks (side cars approach) 69 | 1. Logging 70 | 1. Monitoring 71 | 1. Load balancing 72 | 1. Path-based routing 73 | 1. Circuit breaking 74 | 75 | ### Tools 76 | 77 | 1. Kubernetes 78 | 1. Docker Swarm 79 | 1. Mesos 80 | 1. Nomad 81 | 1. Fully-managed: EKS, GKE, ECS 82 | 1. [Ubuntus MAAS](https://www.ubuntu.com/server/maas) (metal as a service) 83 | 1. [OpenStack](https://www.openstack.org/) 84 | 85 | ## Pipelines 86 | 87 | ### Continuos Integration 88 | 89 | Triggers: 90 | 91 | 1. Commit to source repo, build and test project 92 | 1. What else? 93 | 94 | ### Tools 95 | 96 | 1. Github, GitLab, Git 97 | 1. Jenkins, Travis, Circle 98 | 1. AWS, GCP, Azure 99 | 1. Docker Repos 100 | 1. Linters, static code analysis 101 | 102 | ### Continuous Delivery 103 | 104 | Triggers: 105 | 106 | 1. On successful build, deploy 107 | 1. What else? 108 | 109 | ### Tools 110 | 111 | 1. Shell scripts (yuk!) 112 | 1. Fabric (shell scripts on steroids) 113 | 1. Terraform templates 114 | 1. AWS (CodeDeploy, CodePipeline, CloudFormation), GCP, Azure 115 | 1. Concourse 116 | 1. [Spinnaker](https://www.spinnaker.io/) 117 | 1. Old school (Ansible, Chef, Puppet) 118 | 119 | 120 | ![microservices-overview-ci-cd](microservices-overview-ci-cd.png) 121 | -------------------------------------------------------------------------------- /microservices-overview-ci-cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/testdrivenio/microservices/99d221fb44431bce5e6bd970dbcd2974eda7dd8d/microservices-overview-ci-cd.png -------------------------------------------------------------------------------- /microservices-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/testdrivenio/microservices/99d221fb44431bce5e6bd970dbcd2974eda7dd8d/microservices-overview.png --------------------------------------------------------------------------------