SlideShare a Scribd company logo
1 of 59
Fastly GSLB: Scaling
your microservice and
multi-cloud
environments
Chris Buckley
Sales Engineer | Fastly
• Sales Engineer @ Fastly, Media & Publishing
• Previously Director of DevOps @ Business Insider
A little about me...
• Introduction to Load Balancing
• Workshop 1: Multi-Cloud Load Balancing
• Workshop 2: SOA/Microservice Routing
• Workshop 3: Geographic Load Balancing
Load Balancing Workshop Program
Introduction to Load
Balancing
As the name implies, load balancing is designed to distribute traffic between
multiple resources.
From Wikipedia:
“Load balancing aims to optimize resource use, maximize throughput,
minimize response time, and avoid overload of any single resource.”
Load Balancers, How Do They Work?
• Global Server Load Balancing (GSLB) is a method of
directing traffic across multiple networks, be it on the
same site, or on the other side of the world.
• GSLB can be used to load balance across multiple
networks, and primarily uses DNS.
Traditional GSLBs (Global Server Load Balancers)
Fastly GSLBs
● Fastly allows
customers to make
unlimited number of
custom rules
● Fastly software load
balances between
nodes in POP
● Fastly uses DNS to
load balance
between POPs
Browser
Recursive
Resolver
Authoritative
Name Server
Reverse HTTP
Proxy
Application
DNSL4L7
Fastly executes rules
TCP Handshake
Multi-Cloud/Multi-Datacenter Load Balancing
88
Infrastructure agnostic global and
local server load balancing
Unified approach to microservice
architecture
Infrastructure-Agnostic Distribution
● Manage traffic across multiple IaaS,
datacenters, and hybrid-clouds
● Use as GSLB and/or LSLB
● Instant convergence and failover
Content-Aware Routing
● Load balance requests to servers using an
any number of custom rules
● Support microservices architecture
● Choose from various distribution algorithms
to manage load across servers
Immediate Control
● Programmatically add/delete/modify your
servers without having to version your VCL
● Automatic server health checks
● Changes to custom rules update routing
configuration globally within seconds
Traffic Scalability
● Instantly scale to multiple terabits per
second (Tbps) in a manner that is both
cost-effective and transparent
● Mitigates thundering herd problem
Why Fastly Load Balancing?
Before we begin...
• To ease usage of the API, set environment variables for API key and service
ID.
• Copy API key from the Github README.md, and your service ID from the
sheet given to you at the beginning of this workshop
• Assuming a Bash shell, run the following:
Initial Setup
export API_KEY=<api_key>
export SERVICE_ID=<service_id>
• We will be working with an API that returns JSON as its response.
• Make sure you are taking note of the responses!
• JQ can be used for making responses readable (link in README.md).
• If at any time you get version drift in this workshop, you can find out your
current active version and work from that using the following command:
General Workshop Tips
curl sv -H "Fastly-Key: ${API_KEY}" 
https://api.fastly.com/service/${SERVICE_ID}/details | jq
You will receive a JSON response listing all versions. You will want to find the one
where "active": true:
General Workshop Tips cont...
{
"testing": false,
"locked": true,
"number": 10,
"active": true,
"service_id": "3SewbytL2TOibn8tO3OFrM",
"staging": false,
"created_at": "2017-06-16T01:07:30+00:00",
"deleted_at": null,
"comment": "",
"updated_at": "2017-06-16T01:14:14+00:00",
"deployed": false
},
You can then clone from your current active version and
work from there.
Workshop 1: Multi-cloud
Load Balancing
• Get familiar with the Fastly API
• Learn about Dynamic Server Pools
• Use a pool to add servers dynamically
• Create a multi-cloud load balancing configuration
Goals of Workshop 1: Multi-cloud Load Balancing
Goals of Workshop 1: Multi-cloud Load Balancing
• In order to begin adding Dynamic Server Pools, we will first need to clone
your service and create a new pool.
• In this case we will be cloning version 1 of your service to version 2:
Step 1: Cloning a new version
curl -sv -H "Fastly-Key: ${API_KEY}" 
https://api.fastly.com/service/${SERVICE_ID}/version/1/clone 
| jq
JSON response:
Step 1: Cloning a new version cont..
{
"testing": false,
"locked": false,
"number": 2,
"active": false,
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"staging": false,
"created_at": "2017-06-16T21:10:09+00:00",
"deleted_at": null,
"comment": "",
"updated_at": "2017-06-16T21:10:11+00:00",
"deployed": false
}
In the repo there is included a main.vcl to upload to our service. Two things to
note:
1. There is a clearly defined space in vcl_recv where we will be doing our
custom VCL for this workshop.
2. Below you will see return(pass). For this workshop we are passing all traffic
to the backends so that we can see immediate responses (and not cached
responses).
Step 2: Upload boilerplate VCL for service
To upload VCL we must URL encode the file so that we can send it via Curl:
Step 2: Upload boilerplate VCL for service cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H 
"Content-Type: application/x-www-form-urlencoded" 
--data "name=main&main=true" 
--data-urlencode "content@main.vcl" 
https://api.fastly.com/service/${SERVICE_ID}/version/2/vcl | jq
JSON response:
Step 2: Upload boilerplate VCL for service cont...
{
"name": "main",
"main": true,
"content": "<lots of VCL>,
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"version": 2,
"deleted_at": null,
"created_at": "2017-06-20T20:23:52+00:00",
"updated_at": "2017-06-20T20:23:52+00:00"
}
Next, we will need to create a Dynamic Server Pool to add our servers to (note we
are now working with version 2):
Step 3: Create Dynamic Server Pool
curl -sv -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/version/2/pool -d 
'name=cloudpool&comment=cloudpool' | jq
JSON response:
Step 3: Create Dynamic Server Pool cont...
{
"name": "cloudpool",
"comment": "cloudpool",
"service_id": "5wFmyFopB74kQoYtrxY3tw",
"version": "2",
"max_tls_version": null,
"shield": null,
"tls_ca_cert": null,
"request_condition": null,
"first_byte_timeout": "15000",
"tls_ciphers": null,
"tls_sni_hostname": null,
"updated_at": "2017-06-21T20:37:51+00:00",
"id": "3qoucl7vkyLGf2KXmJ1XIK",
…
}
Let’s add the pool ID as an environment variable...
Step 3: Create Dynamic Server Pool cont...
export POOL_ID_1=3qoucl7vkyLGf2KXmJ1XIK
We can now begin to start adding servers to the pool (use the IPs listed above to
add the servers)
You will run this command twice with the different IP addresses:
Step 4: Add servers to the pool
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_1}/server -d 
'address=X.X.X.X' | jq
JSON response:
Step 4: Add servers to the pool cont...
{
"address": "13.58.97.100",
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"pool_id": "49Y2yUtPUukwoGu9KDxFM",
"deleted_at": null,
"port": "80",
"max_conn": 0,
"created_at": "2017-06-20T20:55:33+00:00",
"comment": "",
"weight": "100",
"updated_at": "2017-06-20T20:55:33+00:00",
"id": "6G190tLMQZ9QDE2jRcLkwA"
}
Our last configuration step. Now we have added our pool, activate the version.
Once activated, dynamic servers are not tied to a version and can be added
and removed dynamically:
Step 5: Activate new version
curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT 
https://api.fastly.com/service/${SERVICE_ID}/version/2/activate |
jq
JSON response:
Step 5: Activate new version cont...
{
"testing": false,
"locked": true,
"number": 2,
"active": true,
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"staging": false,
"created_at": "2017-06-20T20:09:40+00:00",
"deleted_at": null,
"comment": "",
"updated_at": "2017-06-20T21:03:44+00:00",
"deployed": false,
"msg": "WARNING: Unused backend 'dummy'"
}
You can safely ignore the dummy WARNING, it is an unused pool to activate your initial service for
this workshop.
Open your browser and navigate to your supplied domain:
<num>.lbworkshop.tech
You should now be able to see something like this:
Step 6: Browse the new load balanced pool
GCE serving the request EC2 serving the request
10 minute break...
Workshop 2: SOA /
Microservice Routing
• Get familiar with Dynamic Server Pools & TLS
• Define a routing condition for sending to your
microservice Server Pool.
• Create two different Server Pools for routing to
different independently scalable load balancers.
Goals of Workshop 2: SOA/Microservice Routing
Goals of Workshop 2: SOA/Microservice Routing
• Clone the active service to a new development version (this time cloning
version 2 to version 3):
Step 1: Create Dynamic Server Pool
curl -sv -H "Fastly-Key: ${API_KEY}" -X PUT 
https://api.fastly.com/service/${SERVICE_ID}/version/2/clone | jq
{
"testing": false,
"locked": false,
"number": 3,
....
}
● JSON response:
• Add an environment variable for the blog hostname (for TLS)::
Step 1: Create Dynamic Server Pool cont...
export BLOG_HOST=blog.lbworkshop.tech
● Create our Server Pool (with TLS data):
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/version/3/pool -d 
"name=blog&comment=blog&use_tls=1&tls_cert_hostname=${BLOG_HOST}|
jq
• JSON response:
Step 1: Create Dynamic Server Pool cont...
{
"name": "wordpress",
"comment": "wordpress",
"use_tls": 1,
"tls_cert_hostname": "blog.lbworkshop.tech",
"version": "3",
"id": "5sufVWoTHlOAOYVRm5jg2G",
…
}
● Export the new pool ID (for use later):
export POOL_ID_BLOG=5sufVWoTHlOAOYVRm5jg2G
• In your repo you will find a file wordpress.vcl.
• This contains VCL to send any requests on the blog route (in this case /blog) to the new created
created Wordpress load balancer.
• Let's add this to main.vcl underneath our workshop 1 set req.backend = cloudpool;. It should
look something more like this, ready to upload:
Step 2: Add conditional routing for blog pool
main.vcl before:
###########################################
# LB WORKSHOP - DO STUFF HERE
###########################################
# Workshop 1 default backend.
set req.backend = cloudpool;
###########################################
# END LB WORKSHOP
###########################################
main.vcl after:
Step 2: Add conditional routing for blog pool cont...
# Workshop 1 default backend.
set req.backend = cloudpool;
# Adding conditional routing to our Wordpress service
if (req.url == "/blog") {
set req.backend = wordpress;
# We will also need to change the host header and modify the request url
# so that we hit the right endpoint.
set req.http.Host = "blog.lbworkshop.tech";
# Remove the /blog from the request URL so that we hit the root of the service
# using regular expressions
set req.url = regsub(req.url, "^/blog", "/");
}
• Upload this as main-blog so to use the new configuration and backend for
the blog:
Step 2: Add conditional routing for blog pool cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H "Content-Type: 
application/x-www-form-urlencoded" --data 
"name=main-blog&main=true" --data-urlencode "content@main.vcl" 
https://api.fastly.com/service/${SERVICE_ID}/version/3/vcl | jq
• JSON response:
Step 2: Add conditional routing for blog pool cont...
{
"name": "main-blog",
"main": true,
"content": <lots of vcl>,
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"version": 3,
"deleted_at": null,
"created_at": "2017-06-21T05:04:54+00:00",
"updated_at": "2017-06-21T05:04:54+00:00"
}
• Add the Wordpress TLS endpoint to the blog pool (using the previously
added POOL_ID_BLOG environment variable):
Step 3: Add TLS backend to Server Pool
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_BLOG}/server -d 
"address=${BLOG_HOST}&comment=wp&port=443" | jq
• JSON response:
Step 3: Add TLS backend to Server Pool cont...
{
"address": "blog.lbworkshop.tech",
"comment": "wp",
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"pool_id": "5sufVWoTHlOAOYVRm5jg2G",
"deleted_at": null,
"port": "443",
"max_conn": 0,
"created_at": "2017-06-21T05:11:18+00:00",
"weight": "100",
"updated_at": "2017-06-21T05:11:18+00:00",
"id": "RzWDZMrMIV1FiHYUY4k5k"
}
• Activate new version (ensuring we’re working with version 3):
Step 3: Add TLS backend to Server Pool cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT 
https://api.fastly.com/service/${SERVICE_ID}/version/3/activate | jq
• Navigate to the new endpoint and see the blog in all its glory (replace the
boilerplate URL with your custom service URL):
http://<num>.lbworkshop.tech/blog
Step 4: Check out your new blog!
Workshop 3: Geographic
Dynamic Server Pools
• Use geographic conditions to route to the closest origin
load balancing pool.
• Learn about failover logic in the case of origins being
unavailable.
• Define a fault tolerant configuration built for speed and
redundancy.
Goals of Workshop 3: Geographic Dynamic Server
Pools
• As we will be introducing code to fail over to a secondary origin (in the case
of the primary origin failing or being unavailable), we will need to add health
checks to our service.
• Set a simple check to test the index of the site, with default health check
settings.
• First, clone current version (this time to version 4):
Step 1: Create origin health check
curl -sv -H "Fastly-Key: ${API_KEY}" -X PUT 
https://api.fastly.com/service/${SERVICE_ID}/version/3/clone | jq
• Add health check to the new version. As the health check will be done over
HTTP/1.1 we will also add a host header in the check:
Step 1: Create origin health check cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/version/4/healthcheck -d 
"name=geo-healthcheck&host=lbworkshop.tech&path=/" | jq
JSON response:
Step 1: Create origin health check cont...
{
"name": "geo-healthcheck",
"path": "/",
"service_id": "1OPpKYvOlWVx37twfGVsq0",
"version": 4,
"threshold": 3,
"window": 5,
"http_version": "1.1",
"timeout": 500,
"method": "HEAD",
"updated_at": "2017-06-16T19:05:02+00:00",
"expected_response": 200,
"deleted_at": null,
"host": "lbworkshop.tech",
…
}
• Create 2 server pools. One called "west" and one "east".
• Attach the health check created previously to each pool.
• East first:
Step 2: Create Geographic Dynamic Server Pools
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/version/4/pool -d 
'name=east&comment=east&healthcheck=geo-healthcheck' | jq
● Add the pool ID as an environment variable:
export POOL_ID_EAST=<pool_id>
• And then west:
Step 2: Create Geographic Dynamic Server Pools
cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/version/4/pool -d 
'name=west&comment=west&healthcheck=geo-healthcheck' | jq
● Add environment variable:
export POOL_ID_WEST=<pool_id>
• Add two instances from workshop 1 into separate pools; the GCE instance
into west, and the EC2 instance into east (run twice, with the different pool
IDs and the instance for each pool):
Step 2: Create Geographic Dynamic Server Pools
cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_EAST}/server -d 
'address=13.58.97.100&comment=ec2' | jq`
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST 
https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_WEST}/server -d 
'address=104.196.253.201&comment=gcs' | jq
• In your repo you will find a file geo.vcl. This contains the logic for backend
selection based on geography, with failover to the secondary origin in case
the original pool is unavailable (based on the health checks).
• Edit the main.vcl file, and replace the following code:
Step 3: Adding VCL for backend selection
# Workshop 1 default backend.
set req.backend = cloudpool;
• Replace it with the new geo.vcl code:
Step 3: Adding VCL for backend selection cont...
# APAC, Asia, and US West all go to US West backend.
if (server.region ~ "^(US-West|APAC|Asia)") {
set req.backend = west;
# All other regions default to US East
} else {
set req.backend = east;
}
# West failover to East
# from unhealthy backend or from restart because of backend status code
if(req.backend == west && (!req.backend.healthy || req.restarts > 0)) {
set req.backend = east;
# East failover to West
} else if(req.backend == east && (!req.backend.healthy || req.restarts > 0)) {
set req.backend = west;
}
• Upload main.vcl as an update to development version (we have given the
new VCL a new name to distinguish from the old, so that we can set this as
the new "main":
Step 3: Adding VCL for backend selection cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H 
"Content-Type: application/x-www-form-urlencoded" 
https://api.fastly.com//service/${SERVICE_ID}/version/4/vcl --data 
"name=main-blog-geo&main=true" --data-urlencode "content@main.vcl"
• Activate our new version and see the new Geo Load Balancing in effect:
Step 3: Adding VCL for backend selection cont...
curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT 
https://api.fastly.com/service/${SERVICE_ID}/version/4/activate
● As this workshop is being held in San Francisco, you should be see the GCE
instance. After Apache is shut down on the GCE us-west1 instance, you
should see failover to our EC2 instance in us-east2.
Thank You
• Workshop GitHub Repository: http://bit.ly/lbworkshop
• API documentation: https://docs.fastly.com/api/
• Dynamic servers documentation: https://docs.fastly.com/guides/dynamic-servers/
• Working with services: https://docs.fastly.com/api/config#service
• Working with service versions: https://docs.fastly.com/api/config#version
• Conditions documentation: https://docs.fastly.com/guides/conditions/
• Geo related features: https://docs.fastly.com/guides/vcl/geoip-related-vcl-features
• Creating health checks via the API: https://docs.fastly.com/api/config#healthcheck
Further Reading
Personal Contact Information
• Name: Chris Buckley
• Email: cbuckley@fastly.com
• Twitter: @ChrisBuckleySA
Contact Information
Fastly Contact Information
• Email: support@fastly.com
• IRC: #fastly on Freenode
• Community: https://community.fastly.com/

More Related Content

What's hot

Altitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rateAltitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rateFastly
 
Fastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly
 
Inside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYCInside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYCFastly
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetFastly
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Fastly
 
Altitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation WorkshopAltitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation WorkshopFastly
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
Benchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsNGINX, Inc.
 
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentCaching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentFastly
 
how to mesure web performance metrics
how to mesure web performance metricshow to mesure web performance metrics
how to mesure web performance metricsMarc Cortinas Val
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCLFastly
 
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissStupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissmacslide
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011Alessandro Nadalin
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebKevin Jones
 
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Ontico
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersCarlos Abalde
 
Prometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksPrometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksSatoshi Suzuki
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSNGINX, Inc.
 
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Jon Watte
 

What's hot (20)

Altitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rateAltitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rate
 
Fastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYCFastly CEO Artur Bergman at Altitude NYC
Fastly CEO Artur Bergman at Altitude NYC
 
Inside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYCInside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYC
 
Altitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under BudgetAltitude SF 2017: Granular, Precached, & Under Budget
Altitude SF 2017: Granular, Precached, & Under Budget
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015
 
Altitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation WorkshopAltitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation Workshop
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Benchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and Results
 
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentCaching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
 
how to mesure web performance metrics
how to mesure web performance metricshow to mesure web performance metrics
how to mesure web performance metrics
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissStupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
NGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern WebNGINX: The Past, Present and Future of the Modern Web
NGINX: The Past, Present and Future of the Modern Web
 
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
 
Unity Makes Strength
Unity Makes StrengthUnity Makes Strength
Unity Makes Strength
 
Varnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developersVarnish Cache Plus. Random notes for wise web developers
Varnish Cache Plus. Random notes for wise web developers
 
Prometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual TalksPrometheus meets Consul -- Consul Casual Talks
Prometheus meets Consul -- Consul Casual Talks
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWS
 
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
 

Similar to Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud environments

LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackOpenShift Origin
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIsJoe Cropper
 
Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)Maarten Mulders
 
Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Eran Harel
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayAmazon Web Services Korea
 
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 PlatformsFIWARE
 
Automating Research Data with Globus Flows and Compute
Automating Research Data with Globus Flows and ComputeAutomating Research Data with Globus Flows and Compute
Automating Research Data with Globus Flows and ComputeGlobus
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesHiroshi SHIBATA
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhiskAlex Glikson
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerNopparat Nopkuat
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
Microservice bus tutorial
Microservice bus tutorialMicroservice bus tutorial
Microservice bus tutorialHuabing Zhao
 
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...confluent
 
Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015Chef
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)ThirdWaveInsights
 
Open shift deployment review getting ready for day 2 operations
Open shift deployment review   getting ready for day 2 operationsOpen shift deployment review   getting ready for day 2 operations
Open shift deployment review getting ready for day 2 operationsHendrik van Run
 
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 platformsFederico Michele Facca
 

Similar to Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud environments (20)

LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIs
 
Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)
 
Micro service architecture
Micro service architectureMicro service architecture
Micro service architecture
 
Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
 
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
 
Automating Research Data with Globus Flows and Compute
Automating Research Data with Globus Flows and ComputeAutomating Research Data with Globus Flows and Compute
Automating Research Data with Globus Flows and Compute
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload Scheduler
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
Microservice bus tutorial
Microservice bus tutorialMicroservice bus tutorial
Microservice bus tutorial
 
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
 
Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)
 
Open shift deployment review getting ready for day 2 operations
Open shift deployment review   getting ready for day 2 operationsOpen shift deployment review   getting ready for day 2 operations
Open shift deployment review getting ready for day 2 operations
 
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
 

More from Fastly

Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleFastly
 
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetAltitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetFastly
 
Altitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup StreamAltitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup StreamFastly
 
Altitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our DestinyAltitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our DestinyFastly
 
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Fastly
 
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationAltitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationFastly
 
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub PagesAltitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub PagesFastly
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeFastly
 
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...Fastly
 
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per dayAltitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per dayFastly
 
Altitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the EdgeAltitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the EdgeFastly
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsFastly
 
Altitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly WorkshopAltitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly WorkshopFastly
 
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKFastly
 
Altitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF WorkshopAltitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF WorkshopFastly
 
Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge Fastly
 
Altitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop DocsAltitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop DocsFastly
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeFastly
 
Enabling lightning fast content delivery for Spotify
Enabling lightning fast content delivery for SpotifyEnabling lightning fast content delivery for Spotify
Enabling lightning fast content delivery for SpotifyFastly
 
What's next in edge computing?
What's next in edge computing?What's next in edge computing?
What's next in edge computing?Fastly
 

More from Fastly (20)

Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
 
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetAltitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
 
Altitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup StreamAltitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup Stream
 
Altitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our DestinyAltitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our Destiny
 
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
 
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationAltitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
 
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub PagesAltitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
 
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
 
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per dayAltitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
 
Altitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the EdgeAltitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the Edge
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & Applications
 
Altitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly WorkshopAltitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly Workshop
 
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
 
Altitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF WorkshopAltitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF Workshop
 
Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge
 
Altitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop DocsAltitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop Docs
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
 
Enabling lightning fast content delivery for Spotify
Enabling lightning fast content delivery for SpotifyEnabling lightning fast content delivery for Spotify
Enabling lightning fast content delivery for Spotify
 
What's next in edge computing?
What's next in edge computing?What's next in edge computing?
What's next in edge computing?
 

Recently uploaded

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud environments

  • 1. Fastly GSLB: Scaling your microservice and multi-cloud environments Chris Buckley Sales Engineer | Fastly
  • 2. • Sales Engineer @ Fastly, Media & Publishing • Previously Director of DevOps @ Business Insider A little about me...
  • 3. • Introduction to Load Balancing • Workshop 1: Multi-Cloud Load Balancing • Workshop 2: SOA/Microservice Routing • Workshop 3: Geographic Load Balancing Load Balancing Workshop Program
  • 5. As the name implies, load balancing is designed to distribute traffic between multiple resources. From Wikipedia: “Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource.” Load Balancers, How Do They Work?
  • 6. • Global Server Load Balancing (GSLB) is a method of directing traffic across multiple networks, be it on the same site, or on the other side of the world. • GSLB can be used to load balance across multiple networks, and primarily uses DNS. Traditional GSLBs (Global Server Load Balancers)
  • 7. Fastly GSLBs ● Fastly allows customers to make unlimited number of custom rules ● Fastly software load balances between nodes in POP ● Fastly uses DNS to load balance between POPs Browser Recursive Resolver Authoritative Name Server Reverse HTTP Proxy Application DNSL4L7 Fastly executes rules TCP Handshake
  • 8. Multi-Cloud/Multi-Datacenter Load Balancing 88 Infrastructure agnostic global and local server load balancing Unified approach to microservice architecture
  • 9. Infrastructure-Agnostic Distribution ● Manage traffic across multiple IaaS, datacenters, and hybrid-clouds ● Use as GSLB and/or LSLB ● Instant convergence and failover Content-Aware Routing ● Load balance requests to servers using an any number of custom rules ● Support microservices architecture ● Choose from various distribution algorithms to manage load across servers Immediate Control ● Programmatically add/delete/modify your servers without having to version your VCL ● Automatic server health checks ● Changes to custom rules update routing configuration globally within seconds Traffic Scalability ● Instantly scale to multiple terabits per second (Tbps) in a manner that is both cost-effective and transparent ● Mitigates thundering herd problem Why Fastly Load Balancing?
  • 11. • To ease usage of the API, set environment variables for API key and service ID. • Copy API key from the Github README.md, and your service ID from the sheet given to you at the beginning of this workshop • Assuming a Bash shell, run the following: Initial Setup export API_KEY=<api_key> export SERVICE_ID=<service_id>
  • 12. • We will be working with an API that returns JSON as its response. • Make sure you are taking note of the responses! • JQ can be used for making responses readable (link in README.md). • If at any time you get version drift in this workshop, you can find out your current active version and work from that using the following command: General Workshop Tips curl sv -H "Fastly-Key: ${API_KEY}" https://api.fastly.com/service/${SERVICE_ID}/details | jq
  • 13. You will receive a JSON response listing all versions. You will want to find the one where "active": true: General Workshop Tips cont... { "testing": false, "locked": true, "number": 10, "active": true, "service_id": "3SewbytL2TOibn8tO3OFrM", "staging": false, "created_at": "2017-06-16T01:07:30+00:00", "deleted_at": null, "comment": "", "updated_at": "2017-06-16T01:14:14+00:00", "deployed": false }, You can then clone from your current active version and work from there.
  • 15. • Get familiar with the Fastly API • Learn about Dynamic Server Pools • Use a pool to add servers dynamically • Create a multi-cloud load balancing configuration Goals of Workshop 1: Multi-cloud Load Balancing
  • 16. Goals of Workshop 1: Multi-cloud Load Balancing
  • 17. • In order to begin adding Dynamic Server Pools, we will first need to clone your service and create a new pool. • In this case we will be cloning version 1 of your service to version 2: Step 1: Cloning a new version curl -sv -H "Fastly-Key: ${API_KEY}" https://api.fastly.com/service/${SERVICE_ID}/version/1/clone | jq
  • 18. JSON response: Step 1: Cloning a new version cont.. { "testing": false, "locked": false, "number": 2, "active": false, "service_id": "1OPpKYvOlWVx37twfGVsq0", "staging": false, "created_at": "2017-06-16T21:10:09+00:00", "deleted_at": null, "comment": "", "updated_at": "2017-06-16T21:10:11+00:00", "deployed": false }
  • 19. In the repo there is included a main.vcl to upload to our service. Two things to note: 1. There is a clearly defined space in vcl_recv where we will be doing our custom VCL for this workshop. 2. Below you will see return(pass). For this workshop we are passing all traffic to the backends so that we can see immediate responses (and not cached responses). Step 2: Upload boilerplate VCL for service
  • 20. To upload VCL we must URL encode the file so that we can send it via Curl: Step 2: Upload boilerplate VCL for service cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H "Content-Type: application/x-www-form-urlencoded" --data "name=main&main=true" --data-urlencode "content@main.vcl" https://api.fastly.com/service/${SERVICE_ID}/version/2/vcl | jq
  • 21. JSON response: Step 2: Upload boilerplate VCL for service cont... { "name": "main", "main": true, "content": "<lots of VCL>, "service_id": "1OPpKYvOlWVx37twfGVsq0", "version": 2, "deleted_at": null, "created_at": "2017-06-20T20:23:52+00:00", "updated_at": "2017-06-20T20:23:52+00:00" }
  • 22. Next, we will need to create a Dynamic Server Pool to add our servers to (note we are now working with version 2): Step 3: Create Dynamic Server Pool curl -sv -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/version/2/pool -d 'name=cloudpool&comment=cloudpool' | jq
  • 23. JSON response: Step 3: Create Dynamic Server Pool cont... { "name": "cloudpool", "comment": "cloudpool", "service_id": "5wFmyFopB74kQoYtrxY3tw", "version": "2", "max_tls_version": null, "shield": null, "tls_ca_cert": null, "request_condition": null, "first_byte_timeout": "15000", "tls_ciphers": null, "tls_sni_hostname": null, "updated_at": "2017-06-21T20:37:51+00:00", "id": "3qoucl7vkyLGf2KXmJ1XIK", … }
  • 24. Let’s add the pool ID as an environment variable... Step 3: Create Dynamic Server Pool cont... export POOL_ID_1=3qoucl7vkyLGf2KXmJ1XIK
  • 25. We can now begin to start adding servers to the pool (use the IPs listed above to add the servers) You will run this command twice with the different IP addresses: Step 4: Add servers to the pool curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_1}/server -d 'address=X.X.X.X' | jq
  • 26. JSON response: Step 4: Add servers to the pool cont... { "address": "13.58.97.100", "service_id": "1OPpKYvOlWVx37twfGVsq0", "pool_id": "49Y2yUtPUukwoGu9KDxFM", "deleted_at": null, "port": "80", "max_conn": 0, "created_at": "2017-06-20T20:55:33+00:00", "comment": "", "weight": "100", "updated_at": "2017-06-20T20:55:33+00:00", "id": "6G190tLMQZ9QDE2jRcLkwA" }
  • 27. Our last configuration step. Now we have added our pool, activate the version. Once activated, dynamic servers are not tied to a version and can be added and removed dynamically: Step 5: Activate new version curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT https://api.fastly.com/service/${SERVICE_ID}/version/2/activate | jq
  • 28. JSON response: Step 5: Activate new version cont... { "testing": false, "locked": true, "number": 2, "active": true, "service_id": "1OPpKYvOlWVx37twfGVsq0", "staging": false, "created_at": "2017-06-20T20:09:40+00:00", "deleted_at": null, "comment": "", "updated_at": "2017-06-20T21:03:44+00:00", "deployed": false, "msg": "WARNING: Unused backend 'dummy'" } You can safely ignore the dummy WARNING, it is an unused pool to activate your initial service for this workshop.
  • 29. Open your browser and navigate to your supplied domain: <num>.lbworkshop.tech You should now be able to see something like this: Step 6: Browse the new load balanced pool GCE serving the request EC2 serving the request
  • 31. Workshop 2: SOA / Microservice Routing
  • 32. • Get familiar with Dynamic Server Pools & TLS • Define a routing condition for sending to your microservice Server Pool. • Create two different Server Pools for routing to different independently scalable load balancers. Goals of Workshop 2: SOA/Microservice Routing
  • 33. Goals of Workshop 2: SOA/Microservice Routing
  • 34. • Clone the active service to a new development version (this time cloning version 2 to version 3): Step 1: Create Dynamic Server Pool curl -sv -H "Fastly-Key: ${API_KEY}" -X PUT https://api.fastly.com/service/${SERVICE_ID}/version/2/clone | jq { "testing": false, "locked": false, "number": 3, .... } ● JSON response:
  • 35. • Add an environment variable for the blog hostname (for TLS):: Step 1: Create Dynamic Server Pool cont... export BLOG_HOST=blog.lbworkshop.tech ● Create our Server Pool (with TLS data): curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/version/3/pool -d "name=blog&comment=blog&use_tls=1&tls_cert_hostname=${BLOG_HOST}| jq
  • 36. • JSON response: Step 1: Create Dynamic Server Pool cont... { "name": "wordpress", "comment": "wordpress", "use_tls": 1, "tls_cert_hostname": "blog.lbworkshop.tech", "version": "3", "id": "5sufVWoTHlOAOYVRm5jg2G", … } ● Export the new pool ID (for use later): export POOL_ID_BLOG=5sufVWoTHlOAOYVRm5jg2G
  • 37. • In your repo you will find a file wordpress.vcl. • This contains VCL to send any requests on the blog route (in this case /blog) to the new created created Wordpress load balancer. • Let's add this to main.vcl underneath our workshop 1 set req.backend = cloudpool;. It should look something more like this, ready to upload: Step 2: Add conditional routing for blog pool main.vcl before: ########################################### # LB WORKSHOP - DO STUFF HERE ########################################### # Workshop 1 default backend. set req.backend = cloudpool; ########################################### # END LB WORKSHOP ###########################################
  • 38. main.vcl after: Step 2: Add conditional routing for blog pool cont... # Workshop 1 default backend. set req.backend = cloudpool; # Adding conditional routing to our Wordpress service if (req.url == "/blog") { set req.backend = wordpress; # We will also need to change the host header and modify the request url # so that we hit the right endpoint. set req.http.Host = "blog.lbworkshop.tech"; # Remove the /blog from the request URL so that we hit the root of the service # using regular expressions set req.url = regsub(req.url, "^/blog", "/"); }
  • 39. • Upload this as main-blog so to use the new configuration and backend for the blog: Step 2: Add conditional routing for blog pool cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H "Content-Type: application/x-www-form-urlencoded" --data "name=main-blog&main=true" --data-urlencode "content@main.vcl" https://api.fastly.com/service/${SERVICE_ID}/version/3/vcl | jq
  • 40. • JSON response: Step 2: Add conditional routing for blog pool cont... { "name": "main-blog", "main": true, "content": <lots of vcl>, "service_id": "1OPpKYvOlWVx37twfGVsq0", "version": 3, "deleted_at": null, "created_at": "2017-06-21T05:04:54+00:00", "updated_at": "2017-06-21T05:04:54+00:00" }
  • 41. • Add the Wordpress TLS endpoint to the blog pool (using the previously added POOL_ID_BLOG environment variable): Step 3: Add TLS backend to Server Pool curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_BLOG}/server -d "address=${BLOG_HOST}&comment=wp&port=443" | jq
  • 42. • JSON response: Step 3: Add TLS backend to Server Pool cont... { "address": "blog.lbworkshop.tech", "comment": "wp", "service_id": "1OPpKYvOlWVx37twfGVsq0", "pool_id": "5sufVWoTHlOAOYVRm5jg2G", "deleted_at": null, "port": "443", "max_conn": 0, "created_at": "2017-06-21T05:11:18+00:00", "weight": "100", "updated_at": "2017-06-21T05:11:18+00:00", "id": "RzWDZMrMIV1FiHYUY4k5k" }
  • 43. • Activate new version (ensuring we’re working with version 3): Step 3: Add TLS backend to Server Pool cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT https://api.fastly.com/service/${SERVICE_ID}/version/3/activate | jq
  • 44. • Navigate to the new endpoint and see the blog in all its glory (replace the boilerplate URL with your custom service URL): http://<num>.lbworkshop.tech/blog Step 4: Check out your new blog!
  • 46. • Use geographic conditions to route to the closest origin load balancing pool. • Learn about failover logic in the case of origins being unavailable. • Define a fault tolerant configuration built for speed and redundancy. Goals of Workshop 3: Geographic Dynamic Server Pools
  • 47. • As we will be introducing code to fail over to a secondary origin (in the case of the primary origin failing or being unavailable), we will need to add health checks to our service. • Set a simple check to test the index of the site, with default health check settings. • First, clone current version (this time to version 4): Step 1: Create origin health check curl -sv -H "Fastly-Key: ${API_KEY}" -X PUT https://api.fastly.com/service/${SERVICE_ID}/version/3/clone | jq
  • 48. • Add health check to the new version. As the health check will be done over HTTP/1.1 we will also add a host header in the check: Step 1: Create origin health check cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/version/4/healthcheck -d "name=geo-healthcheck&host=lbworkshop.tech&path=/" | jq
  • 49. JSON response: Step 1: Create origin health check cont... { "name": "geo-healthcheck", "path": "/", "service_id": "1OPpKYvOlWVx37twfGVsq0", "version": 4, "threshold": 3, "window": 5, "http_version": "1.1", "timeout": 500, "method": "HEAD", "updated_at": "2017-06-16T19:05:02+00:00", "expected_response": 200, "deleted_at": null, "host": "lbworkshop.tech", … }
  • 50. • Create 2 server pools. One called "west" and one "east". • Attach the health check created previously to each pool. • East first: Step 2: Create Geographic Dynamic Server Pools curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/version/4/pool -d 'name=east&comment=east&healthcheck=geo-healthcheck' | jq ● Add the pool ID as an environment variable: export POOL_ID_EAST=<pool_id>
  • 51. • And then west: Step 2: Create Geographic Dynamic Server Pools cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/version/4/pool -d 'name=west&comment=west&healthcheck=geo-healthcheck' | jq ● Add environment variable: export POOL_ID_WEST=<pool_id>
  • 52. • Add two instances from workshop 1 into separate pools; the GCE instance into west, and the EC2 instance into east (run twice, with the different pool IDs and the instance for each pool): Step 2: Create Geographic Dynamic Server Pools cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_EAST}/server -d 'address=13.58.97.100&comment=ec2' | jq` curl -vs -H "Fastly-Key: ${API_KEY}" -X POST https://api.fastly.com/service/${SERVICE_ID}/pool/${POOL_ID_WEST}/server -d 'address=104.196.253.201&comment=gcs' | jq
  • 53. • In your repo you will find a file geo.vcl. This contains the logic for backend selection based on geography, with failover to the secondary origin in case the original pool is unavailable (based on the health checks). • Edit the main.vcl file, and replace the following code: Step 3: Adding VCL for backend selection # Workshop 1 default backend. set req.backend = cloudpool;
  • 54. • Replace it with the new geo.vcl code: Step 3: Adding VCL for backend selection cont... # APAC, Asia, and US West all go to US West backend. if (server.region ~ "^(US-West|APAC|Asia)") { set req.backend = west; # All other regions default to US East } else { set req.backend = east; } # West failover to East # from unhealthy backend or from restart because of backend status code if(req.backend == west && (!req.backend.healthy || req.restarts > 0)) { set req.backend = east; # East failover to West } else if(req.backend == east && (!req.backend.healthy || req.restarts > 0)) { set req.backend = west; }
  • 55. • Upload main.vcl as an update to development version (we have given the new VCL a new name to distinguish from the old, so that we can set this as the new "main": Step 3: Adding VCL for backend selection cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X POST -H "Content-Type: application/x-www-form-urlencoded" https://api.fastly.com//service/${SERVICE_ID}/version/4/vcl --data "name=main-blog-geo&main=true" --data-urlencode "content@main.vcl"
  • 56. • Activate our new version and see the new Geo Load Balancing in effect: Step 3: Adding VCL for backend selection cont... curl -vs -H "Fastly-Key: ${API_KEY}" -X PUT https://api.fastly.com/service/${SERVICE_ID}/version/4/activate ● As this workshop is being held in San Francisco, you should be see the GCE instance. After Apache is shut down on the GCE us-west1 instance, you should see failover to our EC2 instance in us-east2.
  • 58. • Workshop GitHub Repository: http://bit.ly/lbworkshop • API documentation: https://docs.fastly.com/api/ • Dynamic servers documentation: https://docs.fastly.com/guides/dynamic-servers/ • Working with services: https://docs.fastly.com/api/config#service • Working with service versions: https://docs.fastly.com/api/config#version • Conditions documentation: https://docs.fastly.com/guides/conditions/ • Geo related features: https://docs.fastly.com/guides/vcl/geoip-related-vcl-features • Creating health checks via the API: https://docs.fastly.com/api/config#healthcheck Further Reading
  • 59. Personal Contact Information • Name: Chris Buckley • Email: cbuckley@fastly.com • Twitter: @ChrisBuckleySA Contact Information Fastly Contact Information • Email: support@fastly.com • IRC: #fastly on Freenode • Community: https://community.fastly.com/