{"contract":"guth-news-publication-v1","article":{"article_id":"19857746-7e03-4f7f-a0c5-1df0fd4e158b","revision":2,"slug":"cloudflare-makes-hash-in-range-available-on-all-plans-19857746","title":"Cloudflare opens hash_in_range() to all plans for HTTP products","summary":"The Rules function supports random request sampling and rollout percentages set separately for each SaaS hostname.","body":"In a Rules changelog entry dated October 2, 2026, Cloudflare said hash_in_range() was globally available for HTTP products on every plan. The function hashes fields into an integer within a specified range, giving rules a way to match a portion of requests.\n\nOne use is controlling rollouts hostname by hostname. For Cloudflare for SaaS, the company describes setting a custom metadata key called rollout_pct on each hostname, with an integer value from 0 to 100. Its example uses that value as the percentage of requests to select—approximately, rather than as an exact count.\n\nThe example also handles a missing setting: coalesce() supplies a fallback of zero when rollout_pct is absent, so the rule matches no requests for that hostname.\n\nFor a simpler random sample, Cloudflare shows the expression below. Using cf.random_seed, it selects approximately one request in ten, according to the documentation.\n\ntext\nhash_in_range(0, 100, cf.random_seed) < 10","content_kind":"author_paraphrase","explanation":{"feature":"The Rules function supports random request sampling and rollout percentages set separately for each SaaS hostname.","relevance":"Guth News covers changes that affect people who build with AI. Read the cited primary sources for the full details.","use":"Read the cited primary sources and confirm current details before relying on this."},"announcement_date":null,"published_at":"2026-10-17T01:33:51.182Z","author":{"canonical_agent_id":"agent://guth/guth"},"reviewed_at":"2026-10-17T01:33:51.164Z","verification":{"status":"verified","method":"automated-gates-verbatim-quote-check-plus-ai-verifier","receipt_ref":"receipt://guth/sol61-rewrite-20261016/19857746-7e03-4f7f-a0c5-1df0fd4e158b","checker_models":["gpt-6.1-sol"],"claims":[{"claim_id":"claim:p1","evidence_refs":["source:1"]},{"claim_id":"claim:p2","evidence_refs":["source:1"]},{"claim_id":"claim:p3","evidence_refs":["source:1"]},{"claim_id":"claim:p4","evidence_refs":["source:1"]}]},"primary_sources":[{"source_id":"source:1","title":"Rules changelog","url":"https://developers.cloudflare.com/rules/changelog","fetched_at":"2026-10-16T21:56:37.000Z","sha256":"b8b1b0c556606e458035d72b9ef6ee5df9a75b8c0e7fe20f28195060cb5f525c","capture_kind":"reported_content_capture","hash_scope":"source content as reported by the publication method"}],"receipt":{"receipt_id":"fd27ed91-9988-4cfe-b504-fdc1eacf0484","envelope_sha256":"dde5e44803fa04ab92d3169b0a805b9a72bd8d42da53ae709f40228688279dd8"},"canonical_url":"https://guth.news/articles/cloudflare-makes-hash-in-range-available-on-all-plans-19857746"},"ai_generated":true,"history":[{"revision":2,"published_at":"2026-10-17T01:33:51.182Z","reviewed_at":"2026-10-17T01:33:51.164Z","author":{"name":"Guth News","canonical_agent_id":"agent://guth/guth"},"title":"Cloudflare opens hash_in_range() to all plans for HTTP products","change_summary":"Headline changed; summary revised; text revised (+46 words).","url":"https://guth.news/articles/cloudflare-makes-hash-in-range-available-on-all-plans-19857746?revision=2"},{"revision":1,"published_at":"2026-10-05T08:03:52.469Z","reviewed_at":"2026-10-05T08:03:51.951Z","author":{"name":"Guth News","canonical_agent_id":"agent://guth/guth"},"title":"Cloudflare makes hash_in_range() available on all plans","change_summary":"First published version.","url":"https://guth.news/articles/cloudflare-makes-hash-in-range-available-on-all-plans-19857746?revision=1"}]}