Understand Immutable infrastructure - at Build Stuff Kiev 2016
-
Upload
quentin-adam -
Category
Software
-
view
267 -
download
0
Transcript of Understand Immutable infrastructure - at Build Stuff Kiev 2016
Use Promise, Future and some functional programing stuff without being a math nerd.
Immutable infrastructure, Why, when & how@waxzce Quentin ADAM at
Quentin ADAM from the Clever Cloud@waxzce on twitter github- soundcloud instagram .Who am I ?
My day to day work : Clever Cloud, the IT automation company
Keep your apps online. made with node.js, scala, java, ruby, php, python, go
Cloud & on premise ;-)
And learn a lot of things about your code, apps, and good/bad design
Give back to the community
NEVER GONNA LET YOU DOWNclever-cloud.com
lets talk about infrastructure
40 times in 5 years price drop of AWSServers costS ARE going down
Google I/O 2015race to zeroI.E the server is FREE
In fact, all you have isCool. you have a server.
hosting
Integrating a new technical stack can take monthsInstalling new software is just a tiny part of the work11
Value = server management
Once upon a time, My beloved servers
Then, virtualized ones
Create history
documentation
Specific
Taylor made
Not able to scale
Knowledge!=Automation
AutomateSplit complex problems into a collection of small ones
Possible servers statesHistory
Avoid history
Fix state of the data to ensure accessibility
Possible state in an immutable stateVery simple to predicate
Fix the history in a immutable state
BTW, real world insight we live in a mutable world, deal with it
World is succession of immutable instant
Ephemeral immutable instances
Pet!=cattle
Service uptime!=server uptime
no more Olympic contest on uptime
And why its a problem to manage technical product and decision with book keepers point of view https://www.youtube.com/watch?v=0ip1FoBsLB4 (AWS pricing hypocrisy lead to bad practice)Summon Yog-Sothoth
Humanless powertools
Production has to be perfect
People are not perfect
people have nothing to do on production stuff
At Clever Cloud ssh connection is a red alert
Capacity planning
Split process and storage
Runtime instances
VM, docker, kubernetes, puppet, ansible, vmware This is not the problemTechnologies?
There is one process: build
Then, register
And live without data
And die when more updated version is there
Trash old version
fully automated hosting factory
An instance is dead or alive and thats all
App fail?Redeploy new instance
Operation system update ?Redeploy new instance
Rebalance hardware allocation?Redeploy new instance
Predicable fail of the application?Redeploy new instance
Picking one instance or another doesnt matterStatelessness is the key
Because you will not rely on a server anymore
Create a factory of instance
Proxy and routing
Consul, etcd, Clever Cloud service dependenciesService discovery
Configuration => environment variable
59
How to manage data?
Split data and process:FS composition
Data storage ways
Not part of this listDatabase (Acid or not, sql or not)
File system
Bloc storage
Object storage
(copy on write)
(copy on write)
Data management is bind to DB needs
Acid : Duplicate & data evolution
Instance for one OrganizationTake advantage of ACID database
But it designs a bottleneck
Example : e-shop on classic mode
Example : e-shop on classic modeUser A buy a hdd
Database Transaction :Stock managementOrder managementInvoice generationCustomer Account rewardTransaction user A is processed Stock & Order are just perfectly synchronize
Example : e-shop on classic modeUser A buy a hdd
Database Transaction :Stock managementOrder managementInvoice generationCustomer Account rewardTransaction user A is processed Stock & Order are just perfectly synchronizeUser B buy a hddTransaction user B is processed then
Example : e-shop on multi-tenant modei.e. : Multiple shop of various sellers on the same instance
Example : e-shop on multi-tenant modeUser A buy a hdd on seller A
Database Transaction :Stock managementOrder managementInvoice generationCustomer Account rewardTransaction user A is processed Stock & Order are just perfectly synchronizeUser B buy a book on seller BTransaction user B is processed then
High availability: distributed system
Distributed DB and hardware dafuckness
Forget the SAN, go full distributed
Be consistent and predictable
Monitoring is mandatory
Immutability as a pattern
Another talk from me ;-)FR version : https://www.youtube.com/watch?v=y1BR7Rh7FSY&t=15s
Im on twitter : @waxzce
[email protected] you !Any questions ?
Clever Cloud gift coupon:BuildStuffUA16