Table: fastly_pool - Query Fastly Pools using SQL
Fastly Pools are a key component in Fastly's Content Delivery Network (CDN) services. They allow users to group backend servers together, which Fastly then uses to balance load and route traffic. Pools are also used to manage failover scenarios, where traffic can be rerouted to backup servers if the primary servers become unavailable.
Table Usage Guide
The fastly_pool
table provides insights into Fastly Pools within the Fastly CDN services. As a DevOps engineer or site reliability engineer, explore pool-specific details through this table, including configuration settings, health status, and associated backend servers. Utilize it to understand the load balancing and failover strategies of your Fastly CDN, and to ensure optimal performance and reliability of your web services.
Examples
Basic info
Gain insights into the health and configuration of your Fastly service pools, including their creation date, version, and connection timeout settings. This can be useful in monitoring and maintaining optimal service performance.
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_pool;
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_pool;
List pools that are not deleted
Explore which service pools are still active and not marked for deletion. This can assist in managing resources and maintaining an efficient service structure.
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_poolwhere deleted_at is null;
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_poolwhere deleted_at is null;
List random pools
Analyze the settings to understand the configuration and health status of various service pools, particularly those of the 'random' type. This can help in managing resources effectively, identifying potential issues, and optimizing service performance.
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_poolwhere pool_type = 'random';
select id, name, connect_timeout, created_at, healthcheck, service_id, service_versionfrom fastly_poolwhere pool_type = 'random';
List pools of the active versions
Analyze the settings to understand the active versions of your service by identifying their associated pools. This information can help optimize your service's performance and resource allocation.
select id, name, connect_timeout, p.created_at, healthcheck, p.service_id, service_versionfrom fastly_pool as p, fastly_service_version as vwhere p.service_id = v.service_id and p.service_version = v.number and v.active;
select p.id, p.name, p.connect_timeout, p.created_at, p.healthcheck, p.service_id, p.service_versionfrom fastly_pool as p, fastly_service_version as vwhere p.service_id = v.service_id and p.service_version = v.number and v.active = 1;
Schema for fastly_pool
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
comment | text | A freeform descriptive note. | |
connect_timeout | bigint | How long to wait for a timeout in milliseconds. | |
created_at | timestamp with time zone | Timestamp (UTC) of when the pool was created. | |
deleted_at | timestamp with time zone | Timestamp (UTC) of when the pool was deleted. | |
first_byte_timeout | bigint | How long to wait for the first byte in milliseconds. Optional. | |
healthcheck | text | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | |
id | text | Alphanumeric string identifying a Pool. | |
max_conn_default | bigint | Maximum number of connections. | |
max_tls_version | text | Maximum allowed TLS version on connections to this server. Optional. | |
min_tls_version | text | Minimum allowed TLS version on connections to this server. Optional. | |
name | text | = | Name for the Pool. |
override_host | text | The hostname to override the Host header. Defaults to null meaning no override of the Host header will occur. | |
pool_type | text | What type of load balance group to use: random, hash, client. | |
quorum | bigint | Percentage of capacity (0-100) that needs to be operationally available for a pool to be considered up. | |
request_condition | text | Condition which, if met, will select this configuration during a request. Optional. | |
service_id | text | Alphanumeric string identifying the service. | |
service_version | bigint | Integer identifying a service version. | |
shield | text | Selected POP to serve as a shield for the servers. Defaults to null meaning no origin shielding if not set. | |
title | text | Title of the resource. | |
tls_ca_cert | text | A secure certificate to authenticate a server with. Must be in PEM format. | |
tls_cert_hostname | text | The hostname used to verify a server's certificate. It can either be the Common Name (CN) or a Subject Alternative Name (SAN). | |
tls_check_cert | boolean | Be strict on checking TLS certs. Optional. | |
tls_ciphers | text | List of OpenSSL ciphers. | |
tls_client_cert | text | The client certificate used to make authenticated requests. Must be in PEM format. | |
tls_client_key | text | The client private key used to make authenticated requests. Must be in PEM format. | |
tls_sni_hostname | text | SNI hostname. Optional. | |
updated_at | timestamp with time zone | Timestamp (UTC) of when the pool was updated. | |
use_tls | boolean | Whether to use TLS. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- fastly
You can pass the configuration to the command with the --config
argument:
steampipe_export_fastly --config '<your_config>' fastly_pool