Getting started
Basics
Domains & Origins
Performance

Configuration
Basics
Conditions
Dictionaries
Domains & Origins
Request settings
Cache settings
Headers
Responses
Performance
Custom VCL
Image optimization
Video

Security
Access Control Lists
Monitoring and testing
Securing communications
Security measures
TLS
Web Application Firewall

Integrations
Logging endpoints
Non-Fastly services

Diagnostics
Streaming logs
Debugging techniques
Common errors

Account info
Account management
Billing
User access and control

Reference

    Creating and using pools with Dynamic Servers

      Last updated April 25, 2018

    Fastly's Load Balancer allows you to create pools of origin servers that you dynamically manage using Fastly's Dynamic Servers feature to distribute and direct incoming requests. A pool is responsible for balancing requests among a group of origin servers. In addition to load balancing, pools can be configured to attempt retrying failed requests. Pools have a quorum setting that can be used to determine when the pool as a whole is considered up in order to prevent problems following an outage as origin servers come back up.

    Creating a pool

    To start using Dynamic Servers, you'll need to create an empty pool within a version of a service that's unlocked and not yet activated. Make the following API call in a terminal application:

    1
    
    curl -vs -H "Fastly-Key: FASTLY_API_TOKEN" -X POST https://api.fastly.com/service/<service_id>/version/<service_version>/pool -d 'name=<pool_name>&comment=<comment>'
    

    The response will look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    {
        "between_bytes_timeout": "10000",
        "comment": "<comment>",
        "connect_timeout": "1000",
        "created_at": "2016-08-01T14:43:22+00:00",
        "deleted_at": null,
        "first_byte_timeout": "15000",
        "healthcheck": null,
        "id": "2IpWU5CGzPpbpGsABSDops",
        "max_conn_default": "200",
        "max_tls_version": null,
        "min_tls_version": null,
        "name": "<pool_name>",
        "quorum": "75",
        "request_condition": null,
        "service_id": "<service_id>",
        "shield": null,
        "tls_ca_cert": null,
        "tls_cert_hostname": null,
        "tls_check_cert": 1,
        "tls_ciphers": null,
        "tls_client_cert": null,
        "tls_client_key": null,
        "tls_sni_hostname": null,
        "type": "random",
        "updated_at": "2016-08-01T14:43:22+00:00",
        "use_tls": 0,
        "version": "<service_version>"
    }
    

    Be sure to activate the new version of the service you associated with the pool after adding at least one origin server.

    Viewing pools

    To view a list of all pools attached to a particular version of a service, make the following API call in a terminal application:

    1
    
    curl -vs -H "Fastly-Key: FASTLY_API_TOKEN" https://api.fastly.com/service/<service_id>/version/<service_version>/pool
    

    The response will look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    
    [
    {
        "between_bytes_timeout": "10000",
        "comment": "just my first pool",
        "connect_timeout": "1000",
        "created_at": "2016-08-01T14:43:22+00:00",
        "deleted_at": null,
        "first_byte_timeout": "15000",
        "healthcheck": null,
        "id": "2IpWU5CGzPpbpGsABSDops",
        "max_conn_default": "200",
        "max_tls_version": null,
        "min_tls_version": null,
        "name": "SP_Prod_Pool_1",
        "quorum": "75",
        "request_condition": null,
        "service_id": "<service_id>",
        "shield": null,
        "tls_ca_cert": null,
        "tls_cert_hostname": null,
        "tls_check_cert": 1,
        "tls_ciphers": null,
        "tls_client_cert": null,
        "tls_client_key": null,
        "tls_sni_hostname": null,
        "type": "random",
        "updated_at": "2016-08-01T14:43:22+00:00",
        "use_tls": 0,
        "version": "<service_version>"
    }
    ]
    

    To see information related to a single pool (in this example, SP_Prod_Pool_1) attached to a particular version of a service, make the following API call in a terminal application:

    1
    
    curl -vs -H "Fastly-Key: FASTLY_API_TOKEN" https://api.fastly.com/service/<service_id>/version/<service_version>/pool/<pool_name>
    

    The response will look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    {
        "between_bytes_timeout": "10000",
        "comment": "just my first pool",
        "connect_timeout": "1000",
        "created_at": "2016-08-01T14:43:22+00:00",
        "deleted_at": null,
        "first_byte_timeout": "15000",
        "healthcheck": null,
        "id": "2IpWU5CGzPpbpGsABSDops",
        "max_conn_default": "200",
        "max_tls_version": null,
        "min_tls_version": null,
        "name": "SP_Prod_Pool_1",
        "quorum": "75",
        "request_condition": null,
        "service_id": "<service_id>",
        "shield": null,
        "tls_ca_cert": null,
        "tls_cert_hostname": null,
        "tls_check_cert": 1,
        "tls_ciphers": null,
        "tls_client_cert": null,
        "tls_client_key": null,
        "tls_sni_hostname": null,
        "type": "random",
        "updated_at": "2016-08-01T14:43:22+00:00",
        "use_tls": 0,
        "version": "<service_version>"
    }
    

    Deleting a pool

    Deleting a pool deletes the pool and all of its associated server entries. To delete a pool, make the following API call in a terminal application:

    1
    
    curl -vs -H "Fastly-Key: FASTLY_API_TOKEN" -X DELETE https://api.fastly.com/service/<service_id>/version/<service_version>/pool/<pool_name>
    

    The response will look like this:

    1
    2
    3
    
    {
      "status":"ok"
    }
    
    Back to Top