TSHTTPOVERRIDABLECONFIG(3ts)
β¨ NAME β¨
okay so bestie, meet TSHttpOverridableConfig β the TSHttpOverridableConfig API function π
. This whole vibe lives in the manual page TSHTTPOVERRIDABLECONFIG(3ts), and it's literally here to let you peek at and tweak some per-transaction config tea. no cap, it's giving very "customize one transaction, not the whole server" energy β¨.
π¦ SYNOPSIS π¦
#include <ts/ts.h>
TSReturnCode TSHttpTxnConfigIntSet(TSHttpTxn txnp,
TSOverridableConfigKey key, TSMgmtInt value)
TSReturnCode TSHttpTxnConfigIntGet(TSHttpTxn txnp,
TSOverridableConfigKey key, TSMgmtInt *value)
TSReturnCode TSHttpTxnConfigFloatSet(TSHttpTxn txnp,
TSOverridableConfigKey key, TSMgmtFloat value)
TSReturnCode TSHttpTxnConfigFloatGet(TSHttpTxn txnp,
TSOverridableConfigKey key, TSMgmtFloat *value)
TSReturnCode TSHttpTxnConfigStringSet(TSHttpTxn txnp,
TSOverridableConfigKey key, const char *value, int length)
TSReturnCode TSHttpTxnConfigStringGet(TSHttpTxn txnp,
TSOverridableConfigKey key, const char **value, int *length)
TSReturnCode TSHttpTxnConfigFind(const char *name, int length,
TSOverridableConfigKey *key, TSRecordDataType *type)
πΈ DESCRIPTION πΈ
Some of the values that are set in records.config can be changed for a specific transaction. That's the whole point, bestie β one transaction gets its own little config moment, and the rest of the server stays unbothered π.
But real talk, and this part is important: these functions change the configuration values stored for the transaction, which is not quite the same as changing the actual operating values of the transaction. The critical effect is that the value must be changed before it is used by the transaction β after that, changes will not have any effect. so if you roll up late, it's giving "too late, babe" π.
All of the ...Get functions store the internal value in the storage indicated by the value argument. For strings, length* will receive the length of the string. noted, periodt π«Ά.
The values are identified by the enumeration TSOverridableConfigKey. String values can be used indirectly by first passing them to TSHttpTxnConfigFind() which, if the string matches an overridable value, return the key and data type.
π CONFIGURATIONS π
Testing TS_CONFIG_BODY_FACTORY_TEMPLATE_BASE.
The following configurations (from records.config) are overridable:
TS_CONFIG_BODY_FACTORY_TEMPLATE_BASEβproxy.config.body_factory.template_baseTS_CONFIG_HTTP_ALLOW_HALF_OPENβproxy.config.http.allow_half_openTS_CONFIG_HTTP_ALLOW_MULTI_RANGEβproxy.config.http.allow_multi_rangeTS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IPβproxy.config.http.insert_client_ipTS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IPβproxy.config.http.anonymize_remove_client_ipTS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIEβproxy.config.http.anonymize_remove_cookieTS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROMβproxy.config.http.anonymize_remove_fromTS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERERβproxy.config.http.anonymize_remove_refererTS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENTβproxy.config.http.anonymize_remove_user_agentTS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENTβproxy.config.http.attach_server_session_to_clientTS_CONFIG_HTTP_MAX_PROXY_CYCLESβproxy.config.http.max_proxy_cyclesTS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATEβproxy.config.http.auth_server_session_privateTS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUTβproxy.config.http.background_fill_active_timeoutTS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLDβproxy.config.http.background_fill_completed_thresholdTS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIESβproxy.config.http.cache.cache_responses_to_cookiesTS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMICβproxy.config.http.cache.cache_urls_that_look_dynamicTS_CONFIG_HTTP_CACHE_GENERATIONβproxy.config.http.cache.generationTS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIMEβproxy.config.http.cache.guaranteed_max_lifetimeTS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIMEβproxy.config.http.cache.guaranteed_min_lifetime
okay bestie, the mapping list keeps going and we're deep in cache config territory now π every single one of these is a TS_CONFIG_HTTP_* constant on the left and the exact records.config key it lines up with on the right. same deal as before, no skipping, we're doing all of them π
TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTORβproxy.config.http.cache.heuristic_lm_factorTS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIMEβproxy.config.http.cache.heuristic_max_lifetimeTS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIMEβproxy.config.http.cache.heuristic_min_lifetimeTS_CONFIG_HTTP_CACHE_HTTPβproxy.config.http.cache.httpTS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_CHARSET_MISMATCHβproxy.config.http.cache.ignore_accept_charset_mismatchTS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_ENCODING_MISMATCHβproxy.config.http.cache.ignore_accept_encoding_mismatchTS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_LANGUAGE_MISMATCHβproxy.config.http.cache.ignore_accept_language_mismatchTS_CONFIG_HTTP_CACHE_IGNORE_ACCEPT_MISMATCHβproxy.config.http.cache.ignore_accept_mismatchTS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATIONβproxy.config.http.cache.ignore_authenticationTS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGEβproxy.config.http.cache.ignore_client_cc_max_ageTS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHEβproxy.config.http.cache.ignore_client_no_cacheTS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHEβproxy.config.http.cache.ignore_server_no_cacheTS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHEβproxy.config.http.cache.ims_on_client_no_cacheTS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIESβproxy.config.http.cache.max_open_read_retriesTS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIESβproxy.config.http.cache.max_open_write_retriesTS_CONFIG_HTTP_CACHE_MAX_STALE_AGEβproxy.config.http.cache.max_stale_ageTS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIMEβproxy.config.http.cache.open_read_retry_timeTS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTIONβproxy.config.http.cache.open_write_fail_actionTS_CONFIG_HTTP_CACHE_RANGE_LOOKUPβproxy.config.http.cache.range.lookupTS_CONFIG_HTTP_CACHE_RANGE_WRITEβproxy.config.http.cache.range.writeTS_CONFIG_HTTP_CACHE_REQUIRED_HEADERSβproxy.config.http.cache.required_headersTS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATEβproxy.config.http.cache.when_to_revalidateTS_CONFIG_HTTP_CHUNKING_ENABLEDβproxy.config.http.chunking_enabledTS_CONFIG_HTTP_CHUNKING_SIZEβproxy.config.http.chunking.size
like look at that list π the cache girlies really said "we contain multitudes" and honestly? iconic π notice how the constant name and the config key are basically the same thought wearing two different outfits β one's for your C code, one's for records.config. same vibe, different font β¨
and yeah we went from heuristic stuff to chunking stuff in one breath, which is very no thoughts, just constants of the list, but that's the order it's in and we respect the order fr fr π«Ά still more to come, don't go anywhere π
okay continuing the lineup bestie, these are still part of the same big mapping moment, just the next chunk of it π every constant on the left pulls from the config name on the right, no cap:
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVERβ maps toproxy.config.http.connect_attempts_max_retries_dead_serverβ¨TS_CONFIG_HTTP_DROP_CHUNKED_TRAILERSβ maps toproxy.config.http.drop_chunked_trailersπTS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIESβ maps toproxy.config.http.connect_attempts_max_retriesπ¦TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIESβ maps toproxy.config.http.connect_attempts_rr_retriesπTS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUTβ maps toproxy.config.http.connect_attempts_timeoutπΈTS_CONFIG_HTTP_DEFAULT_BUFFER_SIZEβ maps toproxy.config.http.default_buffer_sizeβTS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARKβ maps toproxy.config.http.default_buffer_water_markπ§TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNSβ maps toproxy.config.http.doc_in_cache_skip_dnsπ₯TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIMEβ maps toproxy.config.http.down_server.cache_timeπTS_CONFIG_HTTP_FLOW_CONTROL_ENABLEDβ maps toproxy.config.http.flow_control.enabledπTS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARKβ maps toproxy.config.http.flow_control.high_waterπ«§TS_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARKβ maps toproxy.config.http.flow_control.low_waterπTS_CONFIG_HTTP_FORWARD_CONNECT_METHODβ maps toproxy.config.http.forward_connect_methodπ¬TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENTβ maps toproxy.config.http.forward.proxy_auth_to_parentπTS_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADERβ maps toproxy.config.http.global_user_agent_headerπ§TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSEβ maps toproxy.config.http.insert_age_in_responseβ³TS_CONFIG_HTTP_INSERT_FORWARDEDβ maps toproxy.config.http.insert_forwardedβ‘οΈTS_CONFIG_HTTP_INSERT_REQUEST_VIA_STRβ maps toproxy.config.http.insert_request_via_strπTS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STRβ maps toproxy.config.http.insert_response_via_strπTS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FORβ maps toproxy.config.http.insert_squid_x_forwarded_forπTS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_INβ maps toproxy.config.http.keep_alive_enabled_inπTS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUTβ maps toproxy.config.http.keep_alive_enabled_outπTS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_INβ maps toproxy.config.http.keep_alive_no_activity_timeout_inπ΄TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUTβ maps toproxy.config.http.keep_alive_no_activity_timeout_outπ΄
like, the pattern is so consistent it's almost soothing?? left side is the constant you'd throw in your code, right side is the config knob it's lowkey pointing at, and that's literally the whole relationship. obsessed with the symmetry honestly π«Ά
and yeah we're not done yet, more of these coming, hold on to your hats π
TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUTβproxy.config.http.keep_alive_post_outπΈTS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLEDβproxy.config.http.negative_caching_enabledTS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIMEβproxy.config.http.negative_caching_lifetimeβ¨TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLEDβproxy.config.http.negative_revalidating_enabledTS_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIMEβproxy.config.http.negative_revalidating_lifetimeTS_CONFIG_HTTP_NORMALIZE_AEβproxy.config.http.normalize_aeπTS_CONFIG_HTTP_NUMBER_OF_REDIRECTIONSβproxy.config.http.number_of_redirectionsTS_CONFIG_HTTP_PARENT_CONNECT_ATTEMPT_TIMEOUTβproxy.config.http.parent_proxy.connect_attempts_timeout
bestie the constant saysPARENT_CONNECT_ATTEMPT_TIMEOUTand the config saysparent_proxy.connect_attempts_timeoutβ yes, the words don't line up. that's not a typo on my end, that's literally the mapping. write it down exactly like this or it will not work, periodt. π
TS_CONFIG_HTTP_PARENT_PROXY_FAIL_THRESHOLDβproxy.config.http.parent_proxy.fail_thresholdTS_CONFIG_HTTP_PARENT_PROXY_RETRY_TIMEβproxy.config.http.parent_proxy.retry_timeπ¦TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTSβproxy.config.http.parent_proxy.total_connect_attemptsTS_CONFIG_HTTP_PER_PARENT_CONNECT_ATTEMPTSβproxy.config.http.parent_proxy.per_parent_connect_attempts
okay and this one is also giving "why are you like this" β the constant leads withPER_PARENTbut the config string hasparent_proxysitting in the middle. same deal: copy it character for character, no vibes-based guessing. π
TS_CONFIG_HTTP_PER_SERVER_CONNECTION_MATCHβproxy.config.http.per_server.connection.matchπTS_CONFIG_HTTP_PER_SERVER_CONNECTION_MAXβproxy.config.http.per_server.connection.maxTS_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLEDβproxy.config.http.post.check.content_length.enabledπTS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUTβproxy.config.http.post_connect_attempts_timeout
not thepost.check.content_length.enabledhaving two dots whilepost_connect_attempts_timeouthas none π dots and underscores are load-bearing here, they are not decoration.
TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEYβproxy.config.http.redirect_use_orig_cache_keyTS_CONFIG_HTTP_REQUEST_BUFFER_ENABLEDβproxy.config.http.request_buffer_enabledπ§TS_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZEβproxy.config.http.request_header_max_sizeTS_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZEβproxy.config.http.response_header_max_size
the request/response header max size twins, they're matching, they're coordinated, they ate π one saysrequest_header_max_size, the other saysresponse_header_max_size, and honestly the symmetry is the only peace we get in this whole list.
TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLEDβproxy.config.http.response_server_enabledπTS_CONFIG_HTTP_RESPONSE_SERVER_STRβproxy.config.http.response_server_str
heads up βSTRis not a typo for "string" in some cute abbreviated way, it's literally the constant name, and it maps toresponse_server_str. keep both spellings, bestie, they're a set π«Ά
TS_CONFIG_HTTP_SEND_HTTP11_REQUESTSβproxy.config.http.send_http11_requestsπ₯
note the11, not1.1, nothttp_11with an underscore β it'sTS_CONFIG_HTTP_SEND_HTTP11_REQUESTSon the left andproxy.config.http.send_http11_requestson the right. exactly that. β
TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCHβproxy.config.http.server_session_sharing.matchπ
and yes there's still more where that came from, we're not done yet π
TS_CONFIG_HTTP_SLOW_LOG_THRESHOLDβproxy.config.http.slow.log.thresholdβ±οΈTS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_INβproxy.config.http.transaction_active_timeout_inTS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUTβproxy.config.http.transaction_active_timeout_outTS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_INβproxy.config.http.transaction_no_activity_timeout_inTS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUTβproxy.config.http.transaction_no_activity_timeout_outTS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENTβproxy.config.http.uncacheable_requests_bypass_parentTS_CONFIG_NET_SOCK_OPTION_FLAG_OUTβproxy.config.net.sock_option_flag_outTS_CONFIG_NET_SOCK_PACKET_MARK_OUTβproxy.config.net.sock_packet_mark_outTS_CONFIG_NET_SOCK_PACKET_TOS_OUTβproxy.config.net.sock_packet_tos_outTS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUTβproxy.config.net.sock_recv_buffer_size_outTS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUTβproxy.config.net.sock_send_buffer_size_outTS_CONFIG_PARENT_FAILURES_UPDATE_HOSTDBβproxy.config.http.parent_proxy.mark_down_hostdbTS_CONFIG_SRV_ENABLEDβproxy.config.srv_enabledTS_CONFIG_SSL_CLIENT_CERT_FILENAMEβproxy.config.ssl.client.cert.filenameTS_CONFIG_SSL_CERT_FILEPATHβproxy.config.ssl.client.cert.pathTS_CONFIG_SSL_CLIENT_VERIFY_SERVER_PROPERTIESβproxy.config.ssl.client.verify.server.propertiesTS_CONFIG_SSL_CLIENT_VERIFY_SERVER_POLICYβproxy.config.ssl.client.verify.server.policyTS_CONFIG_SSL_CLIENT_SNI_POLICYβproxy.config.ssl.client.sni_policyTS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINSβproxy.config.ssl.hsts_include_subdomainsTS_CONFIG_SSL_HSTS_MAX_AGEβproxy.config.ssl.hsts_max_ageTS_CONFIG_URL_REMAP_PRISTINE_HOST_HDRβproxy.config.url_remap.pristine_host_hdrTS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUTβproxy.config.websocket.active_timeoutTS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUTβproxy.config.websocket.no_activity_timeoutTS_CONFIG_SSL_CLIENT_CERT_FILENAMEβproxy.config.ssl.client.cert.filenameπ
ok bestie so yes, TS_CONFIG_SSL_CLIENT_CERT_FILENAME literally shows up twice in this stretch β once up there and once at the very bottom. That's not me glitching, that's just how the table is laid out. Keep both, don't @ me π
and we are still in the mapping table, if you can believe it. the TS_CONFIG_* name on the left is the thing you hand to the API, the proxy.config.* name on the right is the config knob it's vibing with. two names, one soul, iconic honestly β¨
TS_CONFIG_SSL_CLIENT_PRIVATE_KEY_FILENAMEβ maps toproxy.config.ssl.client.private_key.filename, aka where ur client's private key lives π keep it secret, keep it safe fr.TS_CONFIG_SSL_CLIENT_CA_CERT_FILENAMEβ maps toproxy.config.ssl.client.CA.cert.filename, the CA cert file the client checks against, so everybody knows who's who π.TS_CONFIG_HTTP_HOST_RESOLUTION_PREFERENCEβ maps toproxy.config.hostdb.ip_resolve, and it decides how hostnames get resolved into IPs (v4? v6? both? in what order?) β the whole vibe of ur resolution, honestly π.TS_CONFIG_PLUGIN_VC_DEFAULT_BUFFER_INDEXβ maps toproxy.config.plugin.vc.default_buffer_index, the default buffer index ur plugins' virtual connections start with π .TS_CONFIG_PLUGIN_VC_DEFAULT_BUFFER_WATER_MARKβ maps toproxy.config.plugin.vc.default_buffer_water_mark, the default water mark for those plugin virtual connection buffers π.TS_CONFIG_NET_SOCK_NOTSENT_LOWATβ maps toproxy.config.net.sock_notsent_lowat, the "not sent" low-water mark on the socket, so u control how much unsent data is chilling in the buffer before the kernel gets told to pipe down π.TS_CONFIG_BODY_FACTORY_RESPONSE_SUPPRESSION_MODEβ maps toproxy.config.body_factory.response_suppression_mode, which is how the body factory decides when to suppress a response body, lowkey iconic behavior π«Ά.
β¨ EXAMPLES β¨
Bestie, here's the moment u've been waiting for β actual code π. This one turns on transaction buffer control with a high water mark of 262144 and a low water mark of 65536:
int callback(TSCont contp, TSEvent event, void* data)
{
TSHttpTxn txnp = static_cast<TSHttpTxn>(data);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED, 1);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK, 262144);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_LOWER_WATER_MARK, 65536);
return 0;
}
Like, look at it. It's giving flow control π§β¨. TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED gets flipped to 1 (on, slay), then the high and low water marks get set to 262144 and 65536 respectively. No cap, that's the whole example π§.
πΈ SEE ALSO πΈ
TSAPI(3ts)β go read it, it's the whole API neighborhood and it ate π.
π COPYRIGHT π
2026, dev@trafficserver.apache.org
And that's a wrap on the whole page, bestie πβ¨ thank u for reading all 6 parts, u literally have main character energy for making it to the end. This was version 9.2, dated Feb 12, 2026, and the page is TSHTTPOVERRIDABLECONFIG(3ts) β periodt π
π¦. Go forth and override ur configs responsibly π«Άπ.
π¦ where this page comes from
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms