Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
@YourTwitterHandle#DV14 #YourTag @NakedN3rd#Devoxx #GoingGlobal
Going Global with Nomad and
Google Cloud Platform
Bastiaan...
@NakedN3rd#Devoxx #GoingGlobal
Gobal, why bother?
@NakedN3rd#Devoxx #GoingGlobal
Latency costs
Roundtrip from Asia to Europe adds
500ms latency to every request.
In a Googl...
@NakedN3rd#Devoxx #GoingGlobal
Failures
● Process
● Server
● Availability Zone
● Region
● LAN
● WAN
● DNS
@NakedN3rd#Devoxx #GoingGlobal
Our toolchest for today
@NakedN3rd#Devoxx #GoingGlobal
Google Cloud Platform
● Fast: create aVM in 30 seconds.
● Clear concepts
● Easy networking
...
@NakedN3rd#Devoxx #GoingGlobal
Nomad
● Cluster manager
● Scheduler
● Task executor
● Service registrator
● Highly scalable...
@NakedN3rd#Devoxx #GoingGlobal
Nomad Scalability
@NakedN3rd#Devoxx #GoingGlobal
Nomad single region setup
@NakedN3rd#Devoxx #GoingGlobal
Creating the Cluster
● Setting up a Nomad server cluster
● Setting up a Nomad client cluste...
@NakedN3rd#Devoxx #GoingGlobal
Nomad UI
@NakedN3rd#Devoxx #GoingGlobal
Helloworld
● A simple demo webapp.
● Written in Go, no OS dependencies.
● 12 factor.
● /hel...
@NakedN3rd#Devoxx #GoingGlobal
Consul
● Service Registry
● Distributed Health Monitoring
● Highly Available
● KV store
● M...
@NakedN3rd#Devoxx #GoingGlobal
Fabio
@NakedN3rd#Devoxx #GoingGlobal
Nomad Multiregion
@NakedN3rd#Devoxx #GoingGlobal
Nomad Datacenters
“Nomad models infrastructure as regions and datacenters. Regions may
cont...
@NakedN3rd#Devoxx #GoingGlobal
Consul Datacenters
“we define a datacenter to be a networking environment that is
private, ...
@NakedN3rd#Devoxx #GoingGlobal
Global Loadbalancer
@NakedN3rd#Devoxx #GoingGlobal
Configuration Templating
In your Nomad job:
template {
  data = "{{range service "helloworl...
@NakedN3rd#Devoxx #GoingGlobal
Consul Prepared Queries
{
    "Name": "",
    "Template": {
        "Type": "name_prefix_ma...
@NakedN3rd#Devoxx #GoingGlobal
Links
● https://www.nomadproject.io/
● https://github.com/iverberk/nomad-ui
● https://www.c...
Upcoming SlideShare
Loading in …5
×

Devoxx 2016 talk: Going Global with Nomad and Google Cloud Platform

432 views

Published on

Devoxx 2016 talk: Going Global with Nomad and Google Cloud Platform
To go with https://github.com/bastiaanb/devoxx-2016

Published in: Internet
  • Login to see the comments

Devoxx 2016 talk: Going Global with Nomad and Google Cloud Platform

  1. 1. @YourTwitterHandle#DV14 #YourTag @NakedN3rd#Devoxx #GoingGlobal Going Global with Nomad and Google Cloud Platform Bastiaan Bakker
  2. 2. @NakedN3rd#Devoxx #GoingGlobal Gobal, why bother?
  3. 3. @NakedN3rd#Devoxx #GoingGlobal Latency costs Roundtrip from Asia to Europe adds 500ms latency to every request. In a Google experiment in 2006, increasing page load time from 0.4s to 0.9s resulted in 20% lower traffic and revenue.
  4. 4. @NakedN3rd#Devoxx #GoingGlobal Failures ● Process ● Server ● Availability Zone ● Region ● LAN ● WAN ● DNS
  5. 5. @NakedN3rd#Devoxx #GoingGlobal Our toolchest for today
  6. 6. @NakedN3rd#Devoxx #GoingGlobal Google Cloud Platform ● Fast: create aVM in 30 seconds. ● Clear concepts ● Easy networking ● Global load balancer
  7. 7. @NakedN3rd#Devoxx #GoingGlobal Nomad ● Cluster manager ● Scheduler ● Task executor ● Service registrator ● Highly scalable & available ● Docker & non-Docker workloads ● Simple & small ● Multi-Region
  8. 8. @NakedN3rd#Devoxx #GoingGlobal Nomad Scalability
  9. 9. @NakedN3rd#Devoxx #GoingGlobal Nomad single region setup
  10. 10. @NakedN3rd#Devoxx #GoingGlobal Creating the Cluster ● Setting up a Nomad server cluster ● Setting up a Nomad client cluster ● Running the first job, nomad-ui.
  11. 11. @NakedN3rd#Devoxx #GoingGlobal Nomad UI
  12. 12. @NakedN3rd#Devoxx #GoingGlobal Helloworld ● A simple demo webapp. ● Written in Go, no OS dependencies. ● 12 factor. ● /hello Says hello and counts how many times. ● /health endpoint returns health ● /fs/... serves filesytem https://github.com/bastiaanb/helloworld
  13. 13. @NakedN3rd#Devoxx #GoingGlobal Consul ● Service Registry ● Distributed Health Monitoring ● Highly Available ● KV store ● Multi datacenter ● Simple & small
  14. 14. @NakedN3rd#Devoxx #GoingGlobal Fabio
  15. 15. @NakedN3rd#Devoxx #GoingGlobal Nomad Multiregion
  16. 16. @NakedN3rd#Devoxx #GoingGlobal Nomad Datacenters “Nomad models infrastructure as regions and datacenters. Regions may contain multiple datacenters. Servers are assigned to regions and manage all state for the region and make scheduling decisions within that region. Requests that are made between regions are forwarded to the appropriate servers.As an example, you may have a US region with the us­east­1 and us­west­1 datacenters, connected to the EU region with the eu­fr­1 and eu­uk­1 datacenters.”
  17. 17. @NakedN3rd#Devoxx #GoingGlobal Consul Datacenters “we define a datacenter to be a networking environment that is private, low latency, and high bandwidth.This excludes communication that would traverse the public internet, but for our purposes multiple availability zones within a single EC2 region would be considered part of a single datacenter.”
  18. 18. @NakedN3rd#Devoxx #GoingGlobal Global Loadbalancer
  19. 19. @NakedN3rd#Devoxx #GoingGlobal Configuration Templating In your Nomad job: template {   data = "{{range service "helloworld" }}{{.Address}}:{{.Port}}n{{end}}"   destination = "peers.txt"   change_mode = "noop" }
  20. 20. @NakedN3rd#Devoxx #GoingGlobal Consul Prepared Queries {     "Name": "",     "Template": {         "Type": "name_prefix_match"     },     "Service": {         "Service": "${name.full}",         "Failover": {             "NearestN": 3         }     } }
  21. 21. @NakedN3rd#Devoxx #GoingGlobal Links ● https://www.nomadproject.io/ ● https://github.com/iverberk/nomad-ui ● https://www.consul.io/ ● https://github.com/eBay/fabio ● https://github.com/bastiaanb/devoxx-2016 https://github.com/bastiaanb/helloworld ● https://cloud.google.com/compute/docs/load-balancing/http/cross-region-exam ● contact: bbakker@xebia.com

×