characteristics (based on Martin Fowler )
-
Componentization of Services: component is a unit of software that is independently replaceable and upgradeable.
-
Organized around business capabilities
-
Products not projects
-
Smart Endpoints and dump pipes
-
Decentralized Governance
-
Decentralized Data Management
-
Infrastructure Automation
-
Design for failure
-
Evolutionary Design
based on this article by Martin Fowler
-
Rapid provisioning: you should be able to fire up a new server in a matter of hours.
-
Basic Monitoring: detecting technical issues (counting errors, service availability, etc) but it's also worth monitoring business issues (such as detecting a drop in orders). If a sudden problem appears then you need to ensure you can quickly rollback
-
Rapid Application Deployment: you need to be able to quickly deploy them, both to test environments and to production.
-
DevOps Culture: close collaboration between developers and operations- an important organizational shift is needed.
modern application platform
![modern application architecture](modern application architecture.png)
Kong: Open source management layer for APIs built on top of NGINX. Protect your services with authentication and security layers using oauth, key, basic, CORS etc.
Tyk is a lightweight, open source API Gateway and enables you to control who accesses your API, when they access it and how they access it. Tyk will also record detailed analytics on how your users are interacting with your API and when things go wrong. Written in Go language.
LoopBack is an open source Node.js framework built on top of Express optimized for building APIs for mobile, web, and other devices. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.
Further reading
Build microservices: using an API Gateway. Chris Richardson
This is a recording of an online class covering Domain Driven Design, CQRS, Event Sourcing, and the overall architecture around it.
Follow 12 rules when implementing a service using 12 factor methodology
CircuitBreaker pattern
CircuitBreaker pattern from Michael Nygard’s book "Release It! Design and Deploy Production-Ready Software"
Microsoft Cloud Design patterns: Circuit Breaker pattern
Bulkhead pattern
Timeout pattern
Service API (minimum)
/info
{ Version: "..<github commit #>..data.time, StartTimeEpochSecs: 1430515329, CurrentTimeEpochSecs: 143117131, Uptime: "167h10m2s" //service name //instance id }
/connections
{ currentUsercount: 1, currentlyAuthenticatedUsers: [{ account: '', sessionKey: sessionDuration: publickKeyName: ]} }
/health
Request/response - sync : binary RPC like Thrift or http or Google's Protocolbuffers
Request/response - async: message passing
Event based : messaging middleware like rabbitmq/kafka
-
Service Discovery
-
routing
-
scheduling
-
logging
-
health management
-
metrics
-
access control and authorization
-
user auth
-
service-to-service auth
-
-
security
[Ion Roller from Gilt]
[Bosch from Cloud foundry]
[Empire from Remind]
Testing strategies for microservices development by Toby Clemson
- caching service
- API management and gateway with correlation ID
An easy way to correlate tasks at different nodes that belong to the same domain-level operation is associating a correlation ID to the higher-level operation and let this ID flow through the system so you can later reconstruct the whole history of that operation as it went across the system.
- metrics
- monitoring
- Backing services(12factor)
- Metering and Billing
michael bryzek interview by infoq
runtime dependencies compile dependencies
Sam NewMan. Answering questions (from Devxx) on Microservices, Jun 22, 2015
Sam Ramji, cloud foundry foundation. The Makings of a Modern Application Architecture