SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Błażej Kasperczyk, Kraków, 05.10.2017
Hey, let's build a PaaS Cloud!
...it's easy, right?
Team PaaS...
3
• DevOps team
• Develop and maintain the
Platform
• Backend-oriented
• Python 3.x, Tornado
"With the friends you have in your team, you don't really need enemies!"
• Approx. 2300 VMs of varying sizes
• 1400 active applications, 600 of them in Python3.x
• 9000+ running instances
• ...a third of it is Python, Tornado-based applications
...And our little cloud – and what runs on it
4
• Push-button deployment
• Scale by available resources and the amount of applications
• Quick application installation with our build system
• Communications bus between applications
The PaaS layer
5
The slow start
• Work started in 2011
• Python2.7 + GEvent
• Works over SSH
• Push model
• Hard limit: 10 applications on
each vm
• ...and it works!
6
The inevitable
• Approx. 150 VMs max
• 300 VMs becomes a hard
limit that cannot be bypassed
• A single point of failure
7
While the panel was primitive, "papyrus" was a top trending colour!
• In place of the old orchestrator – a table of states and a coordinator
• An API that exposes what needs to be done to reach the desired state
• A daemon running on the VM handles the rest
• It's 2013 - let's be modern, let's do it in Python3!
A moment of reinvention:
What if we use our cloud, to scale our cloud?
8
Scoreboard
• Coordinates cloud management
• PostgreSQL backend
• Responsible for provisioning
• Supports over 2000 machines...
• ...each querying multiple times
every minute...
• ...currently.
• It can rebuild itself in case of a
database failure
9
Agent daemon
• Runs on the VM it manages
• Automatically launched with
each new VM
• Launches and maintains
applications
• Reports statistics for monitoring
purposes
• Allows the developer to
remotely shut the application
down
10
Density problems
• Over-taxing VMs causes
performance issues
• As it is, the allocation is hit
and miss.
11
Weight balancing
• Each VM has a capacity limit
• Each application declares its size
• Light (White/Green)
• Medium (Yellow)
• Heavy (Red)
• ...that should do it, right?
12
Oversized cats
• A worker can have spikes of
100% CPU usage and 10%
averaged.
• An application can declare
high usage but be harmless.
13
The RnD
• Docker?
• LXC?
• ...CGroups?
14
Docker
• Requires a major overhaul of
our application building and
deployment...
• ...and will actually do what
we already have.
15
LXC
• Current architecture requires
a lack of network translation
between the Agent and
Application...
• ...and that caused issues
when launching applications
16
CGroups!
• The same mechanism that is
used by most containers
• Automatic cleanup
• Simplicity of the solution
17
• Applications in the cloud no longer exceed their assigned resources
• CPU is limited for each instance
• OOMKiller kicks in for memory-heavy applications that tries to exceed its limits
Everything is now in a box...
18
• Time does not stop, or that time we went Xenial and got eaten by SystemD
• The Damocles' sword called "Impending Knapsack Problem"
• Autoscaling
• ...and a few other things
...time to relax, right?
19
As a side effect, we actually made a sane frontend.
Let's build a PaaS platform, how hard could it be?

Weitere ähnliche Inhalte

Was ist angesagt?

Crash reports pycodeconf
Crash reports pycodeconfCrash reports pycodeconf
Crash reports pycodeconf
lauraxthomson
 

Was ist angesagt? (20)

Firehose
FirehoseFirehose
Firehose
 
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
Monitoring the unknown, 1000*100 series a day - Big Data Vilnius 2017
 
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Problems you’ll face in the Microservices World: Configuration, Authenticatio...Problems you’ll face in the Microservices World: Configuration, Authenticatio...
Problems you’ll face in the Microservices World: Configuration, Authenticatio...
 
Adventures in Research
Adventures in ResearchAdventures in Research
Adventures in Research
 
Crash reports pycodeconf
Crash reports pycodeconfCrash reports pycodeconf
Crash reports pycodeconf
 
How to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphoneHow to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphone
 
Webinar patterns anti patterns
Webinar patterns anti patternsWebinar patterns anti patterns
Webinar patterns anti patterns
 
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
MONITORING THE UNKNOWN, 1000*100 SERIES A DAY - DEVOXX MOROCCO 2017
 
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
 
State of the CLI- Kat Marchan
State of the CLI- Kat MarchanState of the CLI- Kat Marchan
State of the CLI- Kat Marchan
 
Hang fire
Hang fireHang fire
Hang fire
 
ONE Tips & Tricks
ONE Tips & Tricks ONE Tips & Tricks
ONE Tips & Tricks
 
Introduction to Vagrant
Introduction to VagrantIntroduction to Vagrant
Introduction to Vagrant
 
Production ready Vert.x
Production ready Vert.xProduction ready Vert.x
Production ready Vert.x
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
CloudOpen 2013: Developing cloud infrastructure: from scratch: the tale of an...
 
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
Build a reverse proxy for modern immutable infrastructure - Sozu - Devops D D...
 
MySQL Multi-Master Replication
MySQL Multi-Master ReplicationMySQL Multi-Master Replication
MySQL Multi-Master Replication
 
Queue Everything and Please Everyone
Queue Everything and Please EveryoneQueue Everything and Please Everyone
Queue Everything and Please Everyone
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula Puppet Module - Norman Mess...
OpenNebula Conf 2014 | Lightning talk: OpenNebula Puppet Module - Norman Mess...OpenNebula Conf 2014 | Lightning talk: OpenNebula Puppet Module - Norman Mess...
OpenNebula Conf 2014 | Lightning talk: OpenNebula Puppet Module - Norman Mess...
 

Ähnlich wie Let's build a PaaS platform, how hard could it be?

Ähnlich wie Let's build a PaaS platform, how hard could it be? (20)

Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Sharding Containers: Make Go Apps Computer-Friendly Again by Andrey Sibiryov
Sharding Containers: Make Go Apps Computer-Friendly Again by Andrey Sibiryov Sharding Containers: Make Go Apps Computer-Friendly Again by Andrey Sibiryov
Sharding Containers: Make Go Apps Computer-Friendly Again by Andrey Sibiryov
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
Deploying Containers in Production and at Scale
Deploying Containers in Production and at ScaleDeploying Containers in Production and at Scale
Deploying Containers in Production and at Scale
 
1061 (m2)
1061 (m2)1061 (m2)
1061 (m2)
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OS
 
Containing the world with Docker
Containing the world with DockerContaining the world with Docker
Containing the world with Docker
 
Dev Ops without the Ops
Dev Ops without the OpsDev Ops without the Ops
Dev Ops without the Ops
 
Microservices pros and cons dark
Microservices pros and cons darkMicroservices pros and cons dark
Microservices pros and cons dark
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
State of the Container Ecosystem
State of the Container EcosystemState of the Container Ecosystem
State of the Container Ecosystem
 
Cloud computing components
Cloud computing componentsCloud computing components
Cloud computing components
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
 
Cloud computing & lamp applications
Cloud computing & lamp applicationsCloud computing & lamp applications
Cloud computing & lamp applications
 
Telepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for KubernetesTelepresence - Fast Development Workflows for Kubernetes
Telepresence - Fast Development Workflows for Kubernetes
 

Mehr von DreamLab

Mehr von DreamLab (14)

DreamLab Academy #12 Wprowadzenie do React.js
DreamLab Academy #12 Wprowadzenie do React.jsDreamLab Academy #12 Wprowadzenie do React.js
DreamLab Academy #12 Wprowadzenie do React.js
 
Selenium WebDriver Testy Automatyczne w Pythonie | DreamLab Academy #8
Selenium WebDriver Testy Automatyczne w Pythonie | DreamLab Academy #8Selenium WebDriver Testy Automatyczne w Pythonie | DreamLab Academy #8
Selenium WebDriver Testy Automatyczne w Pythonie | DreamLab Academy #8
 
Intro to React | DreamLab Academy
Intro to React | DreamLab AcademyIntro to React | DreamLab Academy
Intro to React | DreamLab Academy
 
Subtelna sztuka optymalizacji
Subtelna sztuka optymalizacji Subtelna sztuka optymalizacji
Subtelna sztuka optymalizacji
 
Podstawy JavaScript | DreamLab Academy #7
Podstawy JavaScript | DreamLab Academy #7Podstawy JavaScript | DreamLab Academy #7
Podstawy JavaScript | DreamLab Academy #7
 
Wdrażanie na wulkanie, czyli CI w świecie który nie znosi opóźnień.
Wdrażanie na wulkanie, czyli CI w świecie który nie znosi opóźnień.Wdrażanie na wulkanie, czyli CI w świecie który nie znosi opóźnień.
Wdrażanie na wulkanie, czyli CI w świecie który nie znosi opóźnień.
 
Gdy testy to za mało - Continuous Monitoring
Gdy testy to za mało - Continuous MonitoringGdy testy to za mało - Continuous Monitoring
Gdy testy to za mało - Continuous Monitoring
 
Intro to JavaScript | Wstęp do programowania w Java Script | DreamLab Academy #4
Intro to JavaScript | Wstęp do programowania w Java Script | DreamLab Academy #4Intro to JavaScript | Wstęp do programowania w Java Script | DreamLab Academy #4
Intro to JavaScript | Wstęp do programowania w Java Script | DreamLab Academy #4
 
Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3 Intro to Redux | DreamLab Academy #3
Intro to Redux | DreamLab Academy #3
 
Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2Quick start with React | DreamLab Academy #2
Quick start with React | DreamLab Academy #2
 
About Motivation in DevOps Culture
About Motivation in DevOps CultureAbout Motivation in DevOps Culture
About Motivation in DevOps Culture
 
Continuous Integration w konfiguracji urządzeń sieciowych
Continuous Integration w konfiguracji urządzeń sieciowychContinuous Integration w konfiguracji urządzeń sieciowych
Continuous Integration w konfiguracji urządzeń sieciowych
 
Real User Monitoring at Scale @ Atmosphere Conference 2016
Real User Monitoring at Scale @ Atmosphere Conference 2016Real User Monitoring at Scale @ Atmosphere Conference 2016
Real User Monitoring at Scale @ Atmosphere Conference 2016
 
DevOps at DreamLab
DevOps at DreamLabDevOps at DreamLab
DevOps at DreamLab
 

Kürzlich hochgeladen

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Let's build a PaaS platform, how hard could it be?

  • 1. Błażej Kasperczyk, Kraków, 05.10.2017 Hey, let's build a PaaS Cloud! ...it's easy, right?
  • 2.
  • 3. Team PaaS... 3 • DevOps team • Develop and maintain the Platform • Backend-oriented • Python 3.x, Tornado "With the friends you have in your team, you don't really need enemies!"
  • 4. • Approx. 2300 VMs of varying sizes • 1400 active applications, 600 of them in Python3.x • 9000+ running instances • ...a third of it is Python, Tornado-based applications ...And our little cloud – and what runs on it 4
  • 5. • Push-button deployment • Scale by available resources and the amount of applications • Quick application installation with our build system • Communications bus between applications The PaaS layer 5
  • 6. The slow start • Work started in 2011 • Python2.7 + GEvent • Works over SSH • Push model • Hard limit: 10 applications on each vm • ...and it works! 6
  • 7. The inevitable • Approx. 150 VMs max • 300 VMs becomes a hard limit that cannot be bypassed • A single point of failure 7 While the panel was primitive, "papyrus" was a top trending colour!
  • 8. • In place of the old orchestrator – a table of states and a coordinator • An API that exposes what needs to be done to reach the desired state • A daemon running on the VM handles the rest • It's 2013 - let's be modern, let's do it in Python3! A moment of reinvention: What if we use our cloud, to scale our cloud? 8
  • 9. Scoreboard • Coordinates cloud management • PostgreSQL backend • Responsible for provisioning • Supports over 2000 machines... • ...each querying multiple times every minute... • ...currently. • It can rebuild itself in case of a database failure 9
  • 10. Agent daemon • Runs on the VM it manages • Automatically launched with each new VM • Launches and maintains applications • Reports statistics for monitoring purposes • Allows the developer to remotely shut the application down 10
  • 11. Density problems • Over-taxing VMs causes performance issues • As it is, the allocation is hit and miss. 11
  • 12. Weight balancing • Each VM has a capacity limit • Each application declares its size • Light (White/Green) • Medium (Yellow) • Heavy (Red) • ...that should do it, right? 12
  • 13. Oversized cats • A worker can have spikes of 100% CPU usage and 10% averaged. • An application can declare high usage but be harmless. 13
  • 14. The RnD • Docker? • LXC? • ...CGroups? 14
  • 15. Docker • Requires a major overhaul of our application building and deployment... • ...and will actually do what we already have. 15
  • 16. LXC • Current architecture requires a lack of network translation between the Agent and Application... • ...and that caused issues when launching applications 16
  • 17. CGroups! • The same mechanism that is used by most containers • Automatic cleanup • Simplicity of the solution 17
  • 18. • Applications in the cloud no longer exceed their assigned resources • CPU is limited for each instance • OOMKiller kicks in for memory-heavy applications that tries to exceed its limits Everything is now in a box... 18
  • 19. • Time does not stop, or that time we went Xenial and got eaten by SystemD • The Damocles' sword called "Impending Knapsack Problem" • Autoscaling • ...and a few other things ...time to relax, right? 19 As a side effect, we actually made a sane frontend.