underestimated costs of microservice architectures · • well known api contracts / specifications...
TRANSCRIPT
![Page 1: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/1.jpg)
8th Light, Inc.
Colin Jones @trptcolin https://8thlight.com
Underestimated costs of microservice architectures
![Page 2: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/2.jpg)
Microservices
![Page 3: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/3.jpg)
🎉 🦄 🌈 Happy! 🌈🦄 🎉
![Page 4: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/4.jpg)
🙀☠ 😨 Sad 😨 ☠🙀
![Page 5: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/5.jpg)
![Page 6: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/6.jpg)
![Page 7: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/7.jpg)
![Page 8: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/8.jpg)
![Page 9: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/9.jpg)
Avoid microservices?
![Page 10: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/10.jpg)
Avoid microservices?
![Page 11: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/11.jpg)
On other hand
But to gain any benefit from microservice thinking, you have to understand what it
is, how to do it, and why you should usually do something else.
- Martin Fowler
![Page 12: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/12.jpg)
Hype Cycle
![Page 13: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/13.jpg)
Accusations
![Page 14: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/14.jpg)
We underestimate costs
![Page 15: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/15.jpg)
Benefits
![Page 16: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/16.jpg)
independent deployability
![Page 17: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/17.jpg)
independent scalability
independent deployability
![Page 18: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/18.jpg)
fault tolerance
independent deployability
independent scalability
![Page 19: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/19.jpg)
avoid dependency hell
independent deployability
independent scalability
fault tolerance
![Page 20: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/20.jpg)
architectural boundaries
independent deployability
independent scalability
fault tolerance
avoid dependency hell
![Page 21: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/21.jpg)
small team ownership
independent deployability
independent scalability
fault tolerance
avoid dependency hell
architectural boundaries
![Page 22: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/22.jpg)
eliminate legacy code
independent deployability
independent scalability
fault tolerance
avoid dependency hell
architectural boundaries
small team ownership
![Page 23: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/23.jpg)
eliminate legacy code
independent deployability
independent scalability
fault tolerance
avoid dependency hell
architectural boundaries
small team ownership
🎉 🎉
🎉
🎉microservices!
![Page 24: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/24.jpg)
Costs & Mitigations
![Page 25: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/25.jpg)
Well-understood costs
![Page 26: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/26.jpg)
Latency
![Page 27: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/27.jpg)
LatencyMitigations
• Cache responses
• Batch calls together
• Coarse-grained service API
![Page 28: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/28.jpg)
Additional infrastructure
Latency
![Page 29: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/29.jpg)
Additional infrastructureMitigations
• Containers
• Infrastructure automation & configuration management
• Virtual machines / cloud
• Auto-scaling (metered cost)
• Serverless
![Page 30: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/30.jpg)
Understanding != Paying
![Page 31: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/31.jpg)
Underestimated Costs
![Page 32: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/32.jpg)
Data consistency
Additional infrastructure
Latency
![Page 33: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/33.jpg)
Data consistency
Orders Service
Main App
Main DB
![Page 34: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/34.jpg)
Data consistency
Orders Service
Main App
Orders DBMain DB
![Page 35: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/35.jpg)
Data consistencyMitigations
• Design for eventual consistency
• Canonical source for data (aka “system of record” / “source of truth”) and derived data
• Backend sync processes
• Service teams co-own ETL for analytics/business intelligence / data warehouse
![Page 36: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/36.jpg)
Data consistency
![Page 37: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/37.jpg)
Failure modes
Data consistency
Additional infrastructure
Latency
![Page 38: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/38.jpg)
Failure modes
A B
![Page 39: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/39.jpg)
Failure modes
A B
???
![Page 40: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/40.jpg)
Failure modes
A B
![Page 41: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/41.jpg)
Failure modes
A B
![Page 42: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/42.jpg)
Failure modes
A B
???
![Page 43: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/43.jpg)
Failure modesMitigations
• Use retries (with backoff; cap the max time)
• Read the remote end to see if it succeeded
• Use fallbacks for read timeouts
• Use circuit breaker to limit cascading failures
• Use bulkheads to protect independent modules
![Page 44: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/44.jpg)
Failure modes
![Page 45: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/45.jpg)
Development & testing
Failure modes
Data consistency
Additional infrastructure
Latency
![Page 46: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/46.jpg)
Development & testing
![Page 47: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/47.jpg)
from "Testing Microservice the Sane Way" by Cindy Sridharan
Development & testing
![Page 48: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/48.jpg)
Mitigations
• Expand testing mindset to staging/production observability efforts
• Integrate only a few services / API checking and rely more on unit tests
• Unify on lightweight runtimes and single database technology [only delays the problem; conflicts with team ownership]
• Test against external environments with services set up [risks test pollution]
• Orchestrate new isolated infrastructure for each test run
Development & testing
![Page 49: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/49.jpg)
Observability
Failure modes
Development & testing
Data consistency
Additional infrastructure
Latency
![Page 50: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/50.jpg)
Observability
![Page 51: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/51.jpg)
ObservabilityMitigations
• Log aggregation with correlation IDs
• Error reporting / alerting [generally on symptoms, not causes]
• Distributed tracing tools
• Monitoring tools / dashboards
• Fancier 3rd-party observability tools
![Page 52: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/52.jpg)
Tunnel vision
Failure modes
Development & testing
Observability
Data consistency
Additional infrastructure
Latency
![Page 53: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/53.jpg)
Tunnel vision
![Page 54: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/54.jpg)
Mitigations
• Measure business metrics, not team velocity
• Make sure team / service incentives are aligned with the company’s
• Rotations / team exchanges / dynamic re-teaming
• Cross-org communication
Tunnel vision
![Page 55: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/55.jpg)
Implicit connection data
Failure modes
Development & testing
Observability
Tunnel vision
Data consistency
Additional infrastructure
Latency
![Page 56: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/56.jpg)
Implicit connection data
![Page 57: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/57.jpg)
Mitigations
• Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift)
• Centralized/standardized repository to track service metadata for service discovery
• Put all services in one codebase (monorepo) for easier searchability
• Custom tooling based on log aggregation / monitoring
Implicit connection data
![Page 58: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/58.jpg)
Inter-team priority conflicts
Failure modes
Development & testing
Observability
Tunnel vision
Implicit connection dataData consistency
Additional infrastructure
Latency
![Page 59: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/59.jpg)
Inter-team priority conflicts
ThemUs
![Page 60: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/60.jpg)
Inter-team priority conflicts
Them
Consumer BUs (Consumer A) Consumer C Consumer C
![Page 61: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/61.jpg)
Mitigations
• Make our case really well to the service team, or management
• Add staff on heavily-used microservices
• Split heavily-used services further
• Contribute to their project (aka “internal open-source”)
• Rebuild a similar service with the changes we need
Inter-team priority conflicts
![Page 62: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/62.jpg)
Hard to change across boundaries
Failure modes
Development & testing
Observability
Tunnel vision
Inter-team priority conflicts
Implicit connection dataData consistency
Additional infrastructure
Latency
![Page 63: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/63.jpg)
Hard to change across boundaries
![Page 64: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/64.jpg)
Hard to change across boundaries
![Page 65: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/65.jpg)
Mitigations
• Be deliberate about the choice to Extract Microservice
• Version your API? [controversial]
• If versioning / breaking: Have a well-defined way to communicate breaking changes / deadlines
• Sticking with the same runtime (e.g. JVM) makes Inline Microservice possible
• Cross-org communication
Hard to change across boundaries
![Page 66: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/66.jpg)
Mitigations
• Skill and culture of backwards compatibility (SemVer, Postel’s Law)
• Don’t make breaking changes
• Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift)
• Consumer-driven contract tests in CI
• See also “Connection data is implicit” mitigations
Hard to change across boundaries
![Page 67: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/67.jpg)
Failure modes
Development & testing
Observability
Tunnel vision
Inter-team priority conflicts
Implicit connection dataData consistency
Additional infrastructure
Latency
💵 💵
🎉
🎉
Hard to change across boundaries
microservices!
![Page 68: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/68.jpg)
Alternatives
![Page 69: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/69.jpg)
Milliservices? Centiservices?
![Page 70: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/70.jpg)
Modules / encapsulation
![Page 71: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/71.jpg)
Modules / encapsulation
![Page 72: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/72.jpg)
Modules / encapsulation
![Page 73: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/73.jpg)
Modules / encapsulation
![Page 74: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/74.jpg)
Recommendations
![Page 75: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/75.jpg)
List problems. Then solutions.
Then pros and cons.
![Page 76: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/76.jpg)
Don’t believe the hype.
![Page 77: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/77.jpg)
Be ready to pay the costs.
![Page 78: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/78.jpg)
Make sure you’re getting the benefits.
![Page 79: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/79.jpg)
Make the change easy. Then make the change.
![Page 80: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/80.jpg)
Make the change easy. Then make the change.
(maybe)
![Page 81: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/81.jpg)
Learn more
![Page 82: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/82.jpg)
Learn more
![Page 83: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/83.jpg)
Learn more•Ben Christensen. “Don’t Build a Distributed Monolith”: https://
www.microservices.com/talks/dont-build-a-distributed-monolith/
•Michael Feathers. “Microservices and the Failure of Encapsulation”: https://michaelfeathers.silvrback.com/microservices-and-the-failure-of-encapsulaton
•Michael Feathers. Working Effectively with Legacy Code: https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052
•Martin Fowler. Enterprise Application Architecture: https://www.martinfowler.com/books/eaa.html
•Martin Fowler. “MicroservicePremium”: https://www.martinfowler.com/bliki/MicroservicePremium.html
•Martin Fowler. “Microservice Prerequisites”: https://www.martinfowler.com/bliki/MicroservicePrerequisites.html
•Martin Fowler. “Microservices Resource Guide”: https://www.martinfowler.com/microservices/
![Page 84: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/84.jpg)
Learn more•Susan Fowler. Production-Ready Microservices: http://shop.oreilly.com/product/
0636920053675.do
•John Gall. The Systems Bible: https://www.amazon.com/Systems-Bible-Beginners-Guide-Large/dp/0961825170
•David Heinemeier Hansson. “The Majestic Monolith”: https://m.signalvnoise.com/the-majestic-monolith-29166d022228
•Rich Hickey. “Hammock Driven Development”: https://www.youtube.com/watch?v=f84n5oFoZBc
•Gregor Hohpe and Bobby Woolf. Enterprise Integration Patterns: http://www.enterpriseintegrationpatterns.com/
•Mike Knepper. “The Hidden Costs of Leaving a Monolith”: https://8thlight.com/blog/mike-knepper/2016/01/20/hidden-costs-of-leaving-a-monolith.html
•Dan Manges. “The Modular Monolith: Rails Architecture”: https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4
•Sam Newman. Building Microservices: https://samnewman.io/books/building_microservices/
![Page 85: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/85.jpg)
Learn more•Michael Nygard. “The Entity Microservice Antipattern”: http://
www.michaelnygard.com/blog/2017/12/the-entity-service-antipattern/
•Michael Nygard. Release It!, 2nd edition: https://pragprog.com/book/mnee2/release-it-second-edition
•Ozan Onay. “You are not Google”: https://blog.bradfieldcs.com/you-are-not-google-84912cf44afb
•Arnon Rotem-Gal-Oz. “Fallacies of Distributed Computing Explained”: http://www.rgoarchitects.com/Files/fallacies.pdf
•Cindy Sridharan. “Testing Microservices, the Sane Way”: https://medium.com/@copyconstruct/testing-microservices-the-sane-way-9bb31d158c16
•Cindy Sridharan. “Testing in Production, the safe way”: https://medium.com/@copyconstruct/testing-in-production-the-safe-way-18ca102d0ef1
•Jim Waldo, Geoff Wyant, Ann Wolrath, and Sam Kendall. “A Note on Distributed Computing”: http://web.cs.wpi.edu/~cs3013/a11/Papers/Waldo_NoteOnDistributedComputing.pdf
![Page 88: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/88.jpg)
Your trusted partner for Agile software product development.
Synerzip
• Accelerate the delivery of your product roadmap • Address technology skill gaps • Save at least 50% with India software development • Augment your team with optional on-site professionals
![Page 89: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/89.jpg)
Synerzip Clients
![Page 90: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/90.jpg)
©SYNERZIP2017Corporate Overview !90
Connect with Synerzip
@Synerzip
linkedin.com/company/synerzip
facebook.com/Synerzip
![Page 91: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/91.jpg)
Next Webinar
Presented by
Damon Poole Agile Coach and Author
Scaling Agile Organically Tuesday, September 18, 2018 at Noon CT
![Page 92: Underestimated costs of microservice architectures · • Well known API contracts / specifications (e.g. JSON Schema, Swagger, Protocol Buffers, Thrift) • Consumer-driven contract](https://reader030.vdocument.in/reader030/viewer/2022040204/5ec62323ad81cc2d16142ee5/html5/thumbnails/92.jpg)
TEXAS | SILICON VALLEY | NYC | INDIA