SlideShare a Scribd company logo
Distributed systems
Experience and tips
Who am I?
• Senior Software Engineering and Data Engineer
• More than 15++ years of experience
• Had fun with tons of projects with different industries.
• …and I’ve started my career working as a game developer
Why
distribute
d apps?
Distributed systems: design, principles and experiencies
• We use apps and services every day.
• For us, this is software
• We don’t care where they are.
• We don’t care where we are.
• We don’t care when we are using it
• Yep, anytime
• We don’t care which device we use.
• They just work
• For us, let’s say they are somehow distributed
Making
software is
easy
Let’s think a bit
Distributed systems: design, principles and experiencies
How we do tests?
Distributed systems: design, principles and experiencies
Distributed systems: design, principles and experiencies
Quick review on minimal practices
• SOLID:
• S - Single Responsibility Principle: A class should have one reason to
change.
• O - Open/Closed Principle: Software entities should be open for extension
but closed for modification.
• L - Liskov Substitution Principle: Subtypes must be substitutable for their
base types.
• I - Interface Segregation Principle: Clients should not be forced to depend
on interfaces they do not use.
• D - Dependency Inversion Principle: High-level modules should not depend
on low-level modules.
Any software should solve a problem
• And we use code for that. How?
• Architecture.
• Good practices.
• Testing
• Design patterns
• Monitoring
• Standards
• And there is a name for this: software engineering
Distributed systems: design, principles and experiencies
Distributed systems: design, principles and experiencies
Let’s talk about architecture
Let’s talk about architecture
Distributed systems: design, principles and experiencies
And if I’m building a
distributed app, will
be easier, right?
Right?
Why make an app distributed?
• Redundancy
• High availability
• Geographical optimization
• Law restrictions
• Performance
• …
How?
• Deploying same app in different places
How?
• How to scale data?
• Multiple databases
• Sharding
• etc
How? Moving away our monolith
• Moving to services
• Split the app in smaller pieces
• Bounded contexts
• Gateways
• Circuit-breaker
• …and more other patterns
How? Moving away our monolith
• Using a standard communication
• REST APIs
• GraphQL
• gRPC
• Using structures for decoupling
• Publisher / Subscriber
• Queues
• BFF
• Webhooks
Example: REST endpoints
• GET /v1/users
• GET /v1/users/12345
• POST /v1/users
• PUT /v1/users/12345
• DELETE /v1/users/12345
Distributed systems: design, principles and experiencies
Most common HTTP status codes
• 200
• 201
• 202
• 400
• 403
• 404
• 429
• 5xx
Services vs
microservices
Microservices
• Autonomous
• Independent
• Own data system, independent
• If it shares database with other thing it could be fine, but it is NOT
a microservice
• Exposed via standards (HTTP, etc)
Distributed systems: design, principles and experiencies
Netflix example
Microservices
• Big scaled orgs
• Should be autonomous at all levels
• Cultural fit
• It should represent the solution of a scale problem, which
can be technical or human
Your first
distributed
app
Tips and tricks: decision making
• Ask yourself this: why do you need to have the app
distributed?
• If the answer is “no idea”, don’t waste time now.
• If the answer is “someone told me that Netflix does it” let’s
go for a long walking
• If there is a reason, then:
• Redundancy/high availability? Go simple
• Performance? Divide and conquer
• Laws? Do the minimum
Tips and tricks: decision making
• Early optimizations without a reason are expensive
• Early architectural decisions without a reason is a pain
• There is always time to scale and change the things. Market
will tell you.
• But keep in mind: you have to measure the impact of your
decision. We do science, not magic.
Tips and tricks: cultural fit
• Is your company prepared to communicate only with your
services?
• Are you able to integrate/build software against services you
don’t know?
• Can you keep your service updated?
• Can your service be down?
Tips and tricks: API and
communications
• Expose a CLEAR API following standards:
• Use OAuth for authentication
• Expose endpoints you will support:
• Use versioning
• Follow standards
• Define HTTP verbs used
• Define rate limiting
• Define headers
• Prepare a docs explaining your API with examples.
• Ensure your doc can be updated at same time your API does
• Include best practices, how you want your API is used, etc.
• Most important: you and your team should be the first user of your API
Tips and tricks: Deployment
• Define how your app/service/microservice can be deployed
• The infra should be coded (Cheff, Terraform, CLI, whatever)
• Any deployment should be automated
• Can your deployment break other parts?
• Any deployment should support to do a rollback
• Define a strategy for rollback / troubleshooting
• Document new scenarios / cases
• Prepare backups if data needs to be changed
• In most cases, you can live without your app running, but not
without the customers data
Tips and tricks: Monitoring
• Use tools for monitoring your app: Log analytics, Cloud
Watch, Datadog, etc
• Define what is an alert and what to do:
• Create a ticket for handle it
• Define on-call strategies
• Must be able to know what is happening in your app
• And yes, if you want to track multiple services, it is more
complicated.
• In general, be reactive and not passive
Tips and tricks: Scaling
• Analyze and measure what is the scaling need:
• In terms of resources: CPU, disk, memory, bandwidth
• In terms of services: login, catalog, jobs, etc.
• If you have a problem scaling could be a quick solution to
sort the issue, not the real solution.
• Decide what kind and when to scale: horizontal, vertical, etc.
• Add rules to handle scaling: by schedule or by metrics
Tips and tricks: general
• There is no silver bullet for doing a distributed apps
• But there are few good practices that are recommended to
follow
• This is a continuous process, not an end destination. Time
will tell you your needs, problems and limitations.
Distributed systems: design, principles and experiencies
Next: coding
time!
Distributed Systems render farm
tutorial
• Go to https://github.com/khnumdev/dist-app-tutorial and
follow the steps

More Related Content

PPT
The economies of scaling software - Abdel Remani
PDF
Building a full-stack app with Golang and Google Cloud Platform in one week
PPTX
Disruptive Trends in Application Development
PPT
The Economies of Scaling Software
PDF
Microservices: The Best Practices
PDF
Reliability Patterns for Distributed Applications
PDF
Stay productive while slicing up the monolith
PDF
Stay productive while slicing up the monolith
The economies of scaling software - Abdel Remani
Building a full-stack app with Golang and Google Cloud Platform in one week
Disruptive Trends in Application Development
The Economies of Scaling Software
Microservices: The Best Practices
Reliability Patterns for Distributed Applications
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith

Similar to Distributed systems: design, principles and experiencies (20)

PDF
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
PDF
Microservices for java architects schamburg-2015-05-19
PDF
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
PDF
I Love APIs - Oct 2015
PDF
Microservices for architects los angeles-2016-07-16
PDF
Microservices for Architects - Atlanta 2018-03-28
PPTX
Microservices
PDF
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
PDF
Architectural Decisions: Smoothly and Consistently
PPTX
Tech Talks Microservices
PPTX
Microservices architecture
PPTX
Think Cloud, Develop Locally
PDF
Microservices for Java Architects (Chicago, April 21, 2015)
PPTX
ThatConference 2016 - Highly Available Node.js
PPTX
Architecting Microservices in .Net
PDF
Migrate to Microservices Judiciously!
PDF
How Heroku uses Heroku to build Heroku
PPTX
Cloud to hybrid edge cloud evolution Jun112020.pptx
PPTX
Full stack development
PPTX
The twelve factor app
Advanced Full Stack Development: Scaling, Deployment, and Maintenance
Microservices for java architects schamburg-2015-05-19
Microservices for Java Architects (Madison-Milwaukee, April 28-9, 2015)
I Love APIs - Oct 2015
Microservices for architects los angeles-2016-07-16
Microservices for Architects - Atlanta 2018-03-28
Microservices
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Architectural Decisions: Smoothly and Consistently
Tech Talks Microservices
Microservices architecture
Think Cloud, Develop Locally
Microservices for Java Architects (Chicago, April 21, 2015)
ThatConference 2016 - Highly Available Node.js
Architecting Microservices in .Net
Migrate to Microservices Judiciously!
How Heroku uses Heroku to build Heroku
Cloud to hybrid edge cloud evolution Jun112020.pptx
Full stack development
The twelve factor app
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
AI in Product Development-omnex systems
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
System and Network Administration Chapter 2
PPTX
Transform Your Business with a Software ERP System
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Digital Strategies for Manufacturing Companies
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Nekopoi APK 2025 free lastest update
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
AI in Product Development-omnex systems
Upgrade and Innovation Strategies for SAP ERP Customers
How Creative Agencies Leverage Project Management Software.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Design an Analysis of Algorithms I-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
Odoo Companies in India – Driving Business Transformation.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
System and Network Administration Chapter 2
Transform Your Business with a Software ERP System
How to Migrate SBCGlobal Email to Yahoo Easily
CHAPTER 2 - PM Management and IT Context
Digital Strategies for Manufacturing Companies
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Ad

Distributed systems: design, principles and experiencies

  • 2. Who am I? • Senior Software Engineering and Data Engineer • More than 15++ years of experience • Had fun with tons of projects with different industries. • …and I’ve started my career working as a game developer
  • 5. • We use apps and services every day. • For us, this is software • We don’t care where they are. • We don’t care where we are. • We don’t care when we are using it • Yep, anytime • We don’t care which device we use. • They just work • For us, let’s say they are somehow distributed
  • 9. How we do tests?
  • 12. Quick review on minimal practices • SOLID: • S - Single Responsibility Principle: A class should have one reason to change. • O - Open/Closed Principle: Software entities should be open for extension but closed for modification. • L - Liskov Substitution Principle: Subtypes must be substitutable for their base types. • I - Interface Segregation Principle: Clients should not be forced to depend on interfaces they do not use. • D - Dependency Inversion Principle: High-level modules should not depend on low-level modules.
  • 13. Any software should solve a problem • And we use code for that. How? • Architecture. • Good practices. • Testing • Design patterns • Monitoring • Standards • And there is a name for this: software engineering
  • 16. Let’s talk about architecture
  • 17. Let’s talk about architecture
  • 19. And if I’m building a distributed app, will be easier, right? Right?
  • 20. Why make an app distributed? • Redundancy • High availability • Geographical optimization • Law restrictions • Performance • …
  • 21. How? • Deploying same app in different places
  • 22. How? • How to scale data? • Multiple databases • Sharding • etc
  • 23. How? Moving away our monolith • Moving to services • Split the app in smaller pieces • Bounded contexts • Gateways • Circuit-breaker • …and more other patterns
  • 24. How? Moving away our monolith • Using a standard communication • REST APIs • GraphQL • gRPC • Using structures for decoupling • Publisher / Subscriber • Queues • BFF • Webhooks
  • 25. Example: REST endpoints • GET /v1/users • GET /v1/users/12345 • POST /v1/users • PUT /v1/users/12345 • DELETE /v1/users/12345
  • 27. Most common HTTP status codes • 200 • 201 • 202 • 400 • 403 • 404 • 429 • 5xx
  • 29. Microservices • Autonomous • Independent • Own data system, independent • If it shares database with other thing it could be fine, but it is NOT a microservice • Exposed via standards (HTTP, etc)
  • 32. Microservices • Big scaled orgs • Should be autonomous at all levels • Cultural fit • It should represent the solution of a scale problem, which can be technical or human
  • 34. Tips and tricks: decision making • Ask yourself this: why do you need to have the app distributed? • If the answer is “no idea”, don’t waste time now. • If the answer is “someone told me that Netflix does it” let’s go for a long walking • If there is a reason, then: • Redundancy/high availability? Go simple • Performance? Divide and conquer • Laws? Do the minimum
  • 35. Tips and tricks: decision making • Early optimizations without a reason are expensive • Early architectural decisions without a reason is a pain • There is always time to scale and change the things. Market will tell you. • But keep in mind: you have to measure the impact of your decision. We do science, not magic.
  • 36. Tips and tricks: cultural fit • Is your company prepared to communicate only with your services? • Are you able to integrate/build software against services you don’t know? • Can you keep your service updated? • Can your service be down?
  • 37. Tips and tricks: API and communications • Expose a CLEAR API following standards: • Use OAuth for authentication • Expose endpoints you will support: • Use versioning • Follow standards • Define HTTP verbs used • Define rate limiting • Define headers • Prepare a docs explaining your API with examples. • Ensure your doc can be updated at same time your API does • Include best practices, how you want your API is used, etc. • Most important: you and your team should be the first user of your API
  • 38. Tips and tricks: Deployment • Define how your app/service/microservice can be deployed • The infra should be coded (Cheff, Terraform, CLI, whatever) • Any deployment should be automated • Can your deployment break other parts? • Any deployment should support to do a rollback • Define a strategy for rollback / troubleshooting • Document new scenarios / cases • Prepare backups if data needs to be changed • In most cases, you can live without your app running, but not without the customers data
  • 39. Tips and tricks: Monitoring • Use tools for monitoring your app: Log analytics, Cloud Watch, Datadog, etc • Define what is an alert and what to do: • Create a ticket for handle it • Define on-call strategies • Must be able to know what is happening in your app • And yes, if you want to track multiple services, it is more complicated. • In general, be reactive and not passive
  • 40. Tips and tricks: Scaling • Analyze and measure what is the scaling need: • In terms of resources: CPU, disk, memory, bandwidth • In terms of services: login, catalog, jobs, etc. • If you have a problem scaling could be a quick solution to sort the issue, not the real solution. • Decide what kind and when to scale: horizontal, vertical, etc. • Add rules to handle scaling: by schedule or by metrics
  • 41. Tips and tricks: general • There is no silver bullet for doing a distributed apps • But there are few good practices that are recommended to follow • This is a continuous process, not an end destination. Time will tell you your needs, problems and limitations.
  • 44. Distributed Systems render farm tutorial • Go to https://github.com/khnumdev/dist-app-tutorial and follow the steps

Editor's Notes

  • #2: Remind events and sessions, including UA until this year :/
  • #3: Home computers without internet: only stuff you have installed Dotcom bubble Q: what was the first company to be considerd as SaaS? Amazon case with AWS and rest APIs
  • #4: 2007: iphone release 2010-2015: “transformacion digital” 2018-2022: blockchain and bitcoin >2022: IA