2. Who am I?
Patrick Mizer
❏ Lead Engineer at SpareFoot
❏ 13 years developing for consumer web
❏ ZCE, AWS Associate Architect
patrick@sparefoot.com
GitHub: maximizer
3. ● Think Hotels.com for storage*
● Everything in AWS and (recently) in containers
● Continuous Delivery: ~100 deployments per week
● > 300 production containers
● Services handle hundreds of requests/sec
* This kind of storage...
4. What I will talk about today
● Briefly: Monolithic Architectures & Microservices Architectures
● Briefly: Docker Containers, what are they?
● How to use Rancher & Containers to implement a production
microservices architecture
○ Deployment
○ Service Discovery
○ Load balancing
○ Scaling
● Build something!
14. Independent Delivery
Build Build Build
Local Integration Staging Production
Deploy
Build
Build Build Build Deploy
Build DeployBuild
15. Independent Delivery
Build Build Build
Local Integration Staging Production
Deploy
Blocked!
Build
Build Build Build Deploy
Build DeployBuild
16. What is Docker?
Build, ship, and run any application,
anywhere…
● Build: Package your application in a container
● Ship: Move that container from one machine to another
● Run: Execute your application
45. So, let’s build something
Public Load
Balancer
Random Number
Service
Web
Private Load
Balancer
www Requirements
● Public access on port 80 to webheads
● Private access only to our super secure
Random Number Service
● Fault Tolerant
○ Can persist one host failing
● Can scale both web and service
independently
46. Our Service
Public Load
Balancer
Random Number
Service
Web
Private Load
Balancer
www
<?php
$ret = ["server_ip" => $_SERVER['SERVER_ADDR'],
"remote_ip" => $_SERVER['REMOTE_ADDR'],
"x_forwarded_for" =>
$_SERVER['HTTP_X_FORWARDED_FOR'],
"random_number_generator" => rand(0, 100)];
echo json_encode($ret);
47. Our Web head
Public Load
Balancer
Random Number
Service
Web
Private Load
Balancer
www
<?php
$randomNumberResponse =
file_get_contents(getenv("RANDOM_NUMBER_URL"));
$randomArr = json_decode(
$randomNumberResponse, true);
?>
<h1>Hello, your random number is:
<?=$randomArr['random_number_generator']?> </h1>