The document discusses various topics related to surviving in a microservices environment. It addresses questions around infrastructure, architecture, team communication and provides advice. Key points include the importance of centralized logging and monitoring, avoiding tight coupling between services, ensuring an overall architectural vision, and being reluctant to add new process unless something goes wrong. The document emphasizes that most of the challenge with microservices is in infrastructure.
2. @spring_io
#springio17
Microservice Blog Posts & Presentations
• Microservices: Yay!
• Microservices: Boo!
• Smashing The Monolith (and here’s how
we did it)
• Microservices + Technology X
• Microservices + Methodology Y
6. @spring_io
#springio17
Why Choose Microservices?
• Reduce Coupling!
• Right Tool for the Job
• Continuous Delivery
• Smaller codebases are easier to reason
about
• Easy to replace old services
• Efficient Scaling
• Can move quickly (once you’re up and
running)
28. @spring_io
#springio17
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
34. @spring_io
#springio17
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
36. @spring_io
#springio17
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
39. @spring_io
#springio17
Sharing Code
• It’s OK to reimplement functionality within
each service
• Setup your own internal Artifactory!
• DO share infrastructure libraries (e.g.
communications)
• NEVER share Domain or business logic
libraries
40. @spring_io
#springio17
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
• How do we manage our (multiple) environments?
42. @spring_io
#springio17
Infrastructure
• How do we manage the logs?
• How about metrics / telemetry?
• How do we deploy our code?
• How/where are our builds done?
• Do we have any coding conventions?
• Can I generate a Service template?
• How do we share code?
• How do we manage our (multiple) environments?
• Do our Devs get time to work on Infrastructure?
52. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in
choosing new technologies?
• How do we test an individual service?
54. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in
choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
56. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in
choosing new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
58. @spring_io
#springio17
HTTP
• Well Established
• Built In libraries / Easy to get started
• Existing structure for response codes (2**, 4**,
5**, etc)
• Synchronous
• Increases coupling
• Requires services to know which others require
their data
• Has dependency on Service Discovery
mechanism
• Susceptible to Data Loss
59. @spring_io
#springio17
Events
• Asynchronous
• Pub-sub / Fire and forget
• Loose Coupling
• Prevents Data Loss
• Allows for Reactive systems
• No existing structure for response error
handling
• Dependency on Message Broker technology
• Can be difficult for Junior folks to
understand
63. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing
new technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
69. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new
technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
• Do we follow an overall architectural style?
83. @spring_io
#springio17
Architecture
• Do we have an overall design vision?
• What technologies do we use?
• How much freedom do we have in choosing new
technologies?
• How do we test an individual service?
• How do we test the platform as a whole?
• How do our services communicate?
• How/where is our data persisted?
• Do we follow an overall architectural style?
• When do we create new services?
86. @spring_io
#springio17
New Service?
• Initially: design platform around Bounded
Contexts, create services from inner
Contexts
• Don’t create services ‘just because’
• Do make an effort to identify boundaries
• Ensure a service has/will have proper
context boundaries before creating
• If two services need to communicate
synchronously or frequently, good
candidates for MERGING
98. @spring_io
#springio17
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
• What’s our process for releasing code?
• What’s our process for monitoring code in
production? Dealing with bugs?
99.
100.
101. @spring_io
#springio17
Team Communication
• How are our teams structured?
• Who owns which Service?
• What’s our process for merging code?
• What’s our process for releasing code?
• What’s our process for monitoring code in
production? Dealing with bugs?
• Do we add more process if something
goes wrong?
110. @spring_io
#springio17
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from
what the user will see
• Release when a feature is ready
• If a service A has another service B as a
dependency => release B first
111. @spring_io
#springio17
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from
what the user will see
• Release when a feature is ready
• If a service A has another service B as a
dependency => release B first
• How to bootstrap a new service?
112. @spring_io
#springio17
Miscellaneous Advice
• Don’t get cute with the naming of services
• New Feature -> walk backwards from
what the user will see
• Release when a feature is ready
• If a service A has another service B as a
dependency => release B first
• How to bootstrap a new service?
• Don’t release Friday afternoons