Distributed tracing
- Transaction ID, Correlation ID
- Google Dapper white paper
- Trace by RisingStack (SaaS)
- Zipkin
Slide 50
Slide 50 text
Response time
Slide 51
Slide 51 text
Even with very fast services
Slide 52
Slide 52 text
...you can have a slow app
:(
Slide 53
Slide 53 text
Because of network delays
Slide 54
Slide 54 text
Network delay is evil
in microservices
Slide 55
Slide 55 text
Keep your services
“close” to each other
Slide 56
Slide 56 text
Proxy approach
Slide 57
Slide 57 text
Proxy
Slide 58
Slide 58 text
Proxy
- Evolutionary design (pro)
- Authentication in proxy (pro)
- Cookie handling at service (cons)
- Service formats response for browser (cons)
Slide 59
Slide 59 text
Services interfaces are
designed with browser in mind
Slide 60
Slide 60 text
API Gateway
Slide 61
Slide 61 text
API Gateway
Img: http://bits.citrusbyte.com/microservices
Slide 62
Slide 62 text
API Gateway
- Everything that’s client(s) specific:
- Auth: Cookie headers, JWT token etc.
- Protocol: http, WebSocket etc.
- Response format: JSON, XML etc.
- Combine resources: from multiple services
Slide 63
Slide 63 text
Security
Slide 64
Slide 64 text
Request signing
- Trusted sources (services) on public channel
- node-http-signature
- Built-in in request and super-request npm libs
https://github.com/joyent/node-http-signature
Slide 65
Slide 65 text
Service teams
Slide 66
Slide 66 text
Your services are products
for your customers and co-workers!
Slide 67
Slide 67 text
Service principles
Slide 68
Slide 68 text
Service principles
max. three depth
call chains
Slide 69
Slide 69 text
Service principles
always backward
compatible endpoints
Slide 70
Slide 70 text
Service principles
do not version
services (only endpoints)
Slide 71
Slide 71 text
Service principles
use feature toggles
heavily (flippers)
Slide 72
Slide 72 text
Service principles
good to start here:
https://github.com/Yelp/service-principles
Slide 73
Slide 73 text
Documented API(s)
Slide 74
Slide 74 text
Documented API
enforce
documentation
Slide 75
Slide 75 text
Documented API
update docs
together with code
Slide 76
Slide 76 text
Documented API
make it available
for everyone
Slide 77
Slide 77 text
Challenges
- Fault tolerance
- Debugging with distributed tracing
- Response times
- Proxy / API Gateway
- Service teams and principles
- Documented API(s)