Slides for for my talk, appeared on Code-Europe Poznan 12.06.2018
(https://www.codeeurope.pl/en/speakers/yshay-yaacobi)
https://github.com/yshayy/not-my-problem-talk
https://github.com/Yshayy/not-my-problem-talk/blob/master/slides/demo.md
10. Service structure
Infra-code and business logic
code live together with every
microservice SERVICE
App Logic
Logging
Monitoring
Authentication
Secrets
Configuration
….
11. Service structure
Can we write only our business code
and let our hosting environment take
care of the rest?
Hosting environment/
Cloud - Infra logic
Service App
logic
12. About me
● Tech lead @ Soluto
● Actually more lazy than what I’ve written
● Really dig open source
● Passionate about cloud architecture, UX/DX,
functional programming, Docker and code quality
● Currently playing “Detroit: Become Human”
Yshay Yaacobi
www.linkedin.com/in/yshayy
www.github.com/yshayy
@yshayy
13. About Soluto
● Based in Tel Aviv, acquired by Asurion at 2013
● We create the next generation of tech support
● Our service is used by ~150M customers
worldwide
● We love open-source
About Soluto
14.
15. Shifting to Microservices
● Less than 5 services -> 100+ services
● Cultural change, new aspects of ownership
● CI/CD - Better tooling and automation
16. Creating a Microservice
● Concerns:
○ Visibility/Observability
○ Security
○ Availability
● Deploy on Azure PaaS (Cloud service)
23. Problems
● Upgrades are hard!
● Code templates are not really upgradable
● Dependencies can break
● Redeployment can be challenging
● Global infrastructure change -> almost impossible
And of course...
26. Use case - from .net to node
● Nuget packages in basic web-api template
○ 80+ packages
○ 10+ developed by soluto
● Hard to decide when and how
● Slows down teams
● Rewrites
○ Soluto.Logging -> @npm*/soluto-logger
○ Soluto.Monitoring -> @npm*/soluto-monitor
27. Dependencies Matrix from hellDependencies Matrix from hell
Authentication
Monitoring
Configuration
Resiliency
Authorization
Logging
HTTP2
Secrets
Validation
SSL
Service/ Runtime
Lang. 1 Lang. 2 Lang. 3 Lang. 4 Lang. 5
Additonal 3rd party package
Fully integrated
No mature/robust solution
28. As a developer, I want to focus on building
features that deliver business value
29. Which of these concerns
can be solved at
environment level?
31. Kubernetes - 1000 foot view
● Cluster manager
● Orchestrate container workloads
● Lots of capabilities - container networking, service discovery,
load-balancing, auto-scaling, secrets, volumes and much more…
● Steep learning curve
● Widely adopted
32. Pod in a nutshell
● Basic scheduling unit of Kubernetes
● Pod per service
● Group of containers
● Containers in a pod share:
○ Network interface
○ Volumes
○ Process namespace
Pod 1 Pod 2
Kubernetes pods
Collections of containers that are co-scheduled
Node
33. A “sidecar” container
● Additional container adjacent
● Provide functionality to support our main
app
● Co-scheduled together on the same pod
Main
App
Sidecar
Pod
Main
App
Sidecar
Replica
Main
App
Sidecar
Replica
34. Sidecars can help us solve infrastructure
concerns externally to our app
36. What did we just see?
● Lots of code elimination
● A leaner, more testable service
● Declarative approach - define what you want,
the environment will take care of the rest
37. What did we just see?
● External processes
● Agents and Proxies
● Supporting containers are
co-scheduled along the
“main” container
Airbag
(.Net)
38. How far can we go?
● Gateways - routing, caching, validation, rate limiting, policies
● Configuration - secrets, cloud resource binding
● Tools - remote debugging/profiling
● Supporting services - analytics, feature flags, etc…
● Probably more...
39. Different implementations
● Reverse proxies/application gateways
● Log collectors
● Metrics exporters
● Many open-source and enterprise solutions - https://landscape.cncf.io/
41. Serverless
● Allows you to focus only on functions and nothing else…
● Sort-of language agnostic
● Event-driven model with separation between triggers/sources/sinks managed by
declarative configuration
42. Serverless - drawbacks
● Works mostly for stateless workload
● Popular solutions comes with serious vendor lock-in across all stack
● Many efforts to make it better/stronger/faster and standard
● Might be the best solution in the future
43. How did it affect us?
● Still on-going process
● Cleaner, leaner services
● Testing got easier
● Faster adoptions of new languages and tools
44. Things we haven’t figured out yet...
● Deployment/Configuration validation
● Isn’t it too magical?
45. As a developer, I want to focus
on building features that
deliver business value.
50. Additional resources
● CNCF landscape - https://landscape.cncf.io/
● Design patterns for container-based distributed systems -
https://static.googleusercontent.com/media/research.google.com/en//pubs/archiv
e/45406.pdf
● Introduction to modern network load balancing and proxying -
https://blog.envoyproxy.io/introduction-to-modern-network-load-balancing-and-
proxying-a57f6ff80236
Notas do Editor
Need to improve
Regardless
Regardless
Still on-going process
New services with almost no “infra” code
Testing got easier
Faster adoptions of new languages and tools
Better developer productivity