New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ability to disable connection-pooling behavior for Dynamic Backends #574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! Do you need to update register_dynamic_backend
in host_api.cpp as well?
fc594fc
to
8363d51
Compare
You are right, yes -- that has now been updated 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
backend_config_mask |= BACKEND_CONFIG_USE_SSL; | ||
if (config->ssl_min_version.is_some) | ||
} | ||
if (config->dont_pool.is_some && config->dont_pool.val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch here!
…Backends This commit adds a new `dontPool` optional property to the `Backend` constructor, which indicates whether or not to disable connection-pooling. Connection pooling is the ability to re-use connections across different executions/sessions of a Fastly Compute@Edge Service Fastly considers two backends "the same" if they’re registered with the same name and the exact same settings. In those cases, when connection pooling is enabled, if an execution/session opens a connection to a backend, the connection will be left open, and can be re-used by another execution/session. This pooling behaviour can help improve backend latency, by removing the need for the initial network / TLS handshake(s). By default, pooling is enabled for Dynamic Backends, but can be disabled when using the Explicit Dynamic Backend API.
8363d51
to
50a26c0
Compare
This commit adds a new
dontPool
optional property to theBackend
constructor, which indicates whether or not to disable connection-pooling.Connection pooling is the ability to re-use connections across different executions/sessions of a Fastly Compute@Edge Service Fastly considers two backends "the same" if they’re registered with the same name and the exact same settings. In those cases, when connection pooling is enabled, if an execution/session opens a connection to a backend, the connection will be left open, and can be re-used by another execution/session. This pooling behaviour can help improve backend latency, by removing the need for the initial network / TLS handshake(s). By default, pooling is enabled for Dynamic Backends, but can be disabled when using the Explicit Dynamic Backend API.