Service Discovery:
From Classic to VPC
Speaker: Mark Corwin
Systems Engineer @ SeatGeek
Myself
Mark Corwin
Systems Engineer, SeatGeek
@mjcdiggity
github.com/mjcdiggity
speakerdeck.com/mjcdiggity
http://bit.ly/23d0eEH
SeatGeek
• "Kayak for live events"
• Ticket Marketplace
• ~8 million users on platform
• ~30 Developers, 3 Ops
• ~150 Servers
• PHP/Python/Go/Ruby/JS
• Chef/Ansible
• AWS/Heroku/Linode
Agenda
1. What is VPC, and why do I care?
2. Setting up a VPC
3. Case Study: Service Discovery at SeatGeek
4. Lessons Learned
EC2 Classic
• Standard Cloud Offering
• Public Nodes with Internet Access
• Shared Tenancy
• Security controlled by Security Groups
VPC
• Virtual Private Cloud
• Public or Private Nodes
• Dedicated or Shared Tenancy
• Multiple Security Layers
Why VPC?
• Network/Security Control
• Decrease footprint on open Internet
• Flexibility
• Latest features and hardware
Latest Instance Types
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
Why Now?
• Upgrade
• Additional Operational Bandwidth
• Experience
• EC2 ClassicLink
SeatGeek VPCs
Getting started with VPC
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario1.html
Other common VPC scenarios
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenarios.html
VPC with Public and Private Subnets (NAT)
http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html
Back to SeatGeek's VPCs
Production/Staging Breakdown
EC2 ClassicLink
• Communicate between EC2 Classic and VPC
• Can link to one ClassicLink enabled VPC
• Requires enabling in VPC and Instances
• 10.0.0.0/16 and 10.0.0.0/8
VPN Breakdown
Final Look
VPC Advice and Wisdom
• Overprovision
• "Measure twice, cut once"
• ClassicLink
Case Study:
Service Discovery at
SeatGeek
What is Service Discovery?
• Lookup • Registration
Consul
http://bit.ly/1PDJkVz
Old Setup
Old Setup
Pros:
• Simplicity
• Good for Static Infrastructure
Cons:
• Complexity
• Single point of failure
• Delayed response
• Fleet management is difficult
Current Setup
Consul Cluster
Problems Solved
• Consul used as Discovery Service
• Removes single point of failure
• Real time response
• Passive solution
New Problems
• External Services
• Consul Template
Unbound
Consul Template
https://github.com/hashicorp/consul-template/issues/331
Migration
1. Setup Consul Cluster
2. Register Services in Consul
3. Use Consul for Service Lookup
4. Recycle nodes into VPC
Current Progress
1. Setup Consul Cluster
2. Register Services in Consul
3. Use Consul for Service Lookup
4. Recycle nodes into VPC
Lessons Learned
• Know your applications
• DNS/Networking
• What problem are you trying to solve?
Start using AWS VPC today!
We're hiring...
https://seatgeek.com/jobs
Questions?

Service Discovery: From Classic to VPC