[{"data":1,"prerenderedAt":708},["ShallowReactive",2],{"navigation":3,"/changelog/v2-3-0":252,"/changelog/v2-3-0-surround":703},[4,34,66,87,106,145,166,176,204],{"title":5,"path":6,"stem":7,"children":8,"icon":32,"defaultOpen":33},"Getting Started","/getting-started","1.getting-started/1.index",[9,12,17,22,27],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-info",{"title":13,"path":14,"stem":15,"icon":16},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",{"title":18,"path":19,"stem":20,"icon":21},"Quickstart (Local)","/getting-started/quickstart-local","1.getting-started/3.quickstart-local","i-lucide-zap",{"title":23,"path":24,"stem":25,"icon":26},"Quickstart (Redis)","/getting-started/quickstart-redis","1.getting-started/4.quickstart-redis","i-lucide-database",{"title":28,"path":29,"stem":30,"icon":31},"Quickstart (Hybrid)","/getting-started/quickstart-hybrid","1.getting-started/5.quickstart-hybrid","i-lucide-arrow-left-right","i-lucide-rocket",true,{"title":35,"icon":36,"defaultOpen":33,"path":37,"stem":38,"children":39,"page":65},"Concepts","i-lucide-lightbulb","/concepts","2.concepts",[40,45,50,55,60],{"title":41,"path":42,"stem":43,"icon":44},"Keys","/concepts/keys","2.concepts/1.keys","i-lucide-key-round",{"title":46,"path":47,"stem":48,"icon":49},"Rate Limits","/concepts/rate-limits","2.concepts/2.rate-limits","i-lucide-badge-percent",{"title":51,"path":52,"stem":53,"icon":54},"Sliding Windows","/concepts/sliding-windows","2.concepts/3.sliding-windows","i-lucide-timer-reset",{"title":56,"path":57,"stem":58,"icon":59},"Decisions","/concepts/decisions","2.concepts/4.decisions","i-lucide-check-check",{"title":61,"path":62,"stem":63,"icon":64},"Configuration Types","/concepts/configuration-types","2.concepts/5.configuration-types","i-lucide-box",false,{"title":67,"icon":68,"defaultOpen":33,"path":69,"stem":70,"children":71,"page":65},"Strategies","i-lucide-git-branch","/strategies","3.strategies",[72,77,82],{"title":73,"path":74,"stem":75,"icon":76},"Absolute","/strategies/absolute","3.strategies/1.absolute","i-lucide-shield",{"title":78,"path":79,"stem":80,"icon":81},"Suppressed","/strategies/suppressed","3.strategies/2.suppressed","i-lucide-activity",{"title":83,"path":84,"stem":85,"icon":86},"How Suppression Works","/strategies/how-suppression-works","3.strategies/3.how-suppression-works","i-lucide-function-square",{"title":88,"icon":89,"defaultOpen":33,"path":90,"stem":91,"children":92,"page":65},"Providers","i-lucide-layers","/providers","4.providers",[93,98,102],{"title":94,"path":95,"stem":96,"icon":97},"Local","/providers/local","4.providers/1.local","i-lucide-cpu",{"title":99,"path":100,"stem":101,"icon":26},"Redis","/providers/redis","4.providers/2.redis",{"title":103,"path":104,"stem":105,"icon":31},"Hybrid","/providers/hybrid","4.providers/3.hybrid",{"title":107,"path":108,"stem":109,"children":110,"icon":76,"defaultOpen":65},"Actix Web","/actix-web","5.actix-web/1.index",[111,113,118,122,127,131,136,140],{"title":112,"path":108,"stem":109,"icon":76},"Overview",{"title":114,"path":115,"stem":116,"icon":117},"Client IPs","/actix-web/client-ips","5.actix-web/2.client-ips","i-lucide-network",{"title":119,"path":120,"stem":121,"icon":44},"Keys and custom extractors","/actix-web/keys","5.actix-web/3.keys",{"title":123,"path":124,"stem":125,"icon":126},"Limits","/actix-web/limits","5.actix-web/4.limits","i-lucide-gauge",{"title":128,"path":129,"stem":130,"icon":26},"Backends","/actix-web/backends","5.actix-web/5.backends",{"title":132,"path":133,"stem":134,"icon":135},"Responses","/actix-web/responses","5.actix-web/6.responses","i-lucide-reply",{"title":137,"path":138,"stem":139,"icon":81},"Observability","/actix-web/observability","5.actix-web/7.observability",{"title":141,"path":142,"stem":143,"icon":144},"Performance","/actix-web/performance","5.actix-web/8.performance","i-lucide-timer",{"title":146,"icon":147,"defaultOpen":65,"path":148,"stem":149,"children":150,"page":65},"Guides","i-lucide-map","/guides","5.guides",[151,156,161],{"title":152,"path":153,"stem":154,"icon":155},"Configuration","/guides/configuration","5.guides/1.configuration","i-lucide-sliders-horizontal",{"title":157,"path":158,"stem":159,"icon":160},"Cleanup","/guides/cleanup","5.guides/2.cleanup","i-lucide-trash-2",{"title":162,"path":163,"stem":164,"icon":165},"Troubleshooting","/guides/troubleshooting","5.guides/4.troubleshooting","i-lucide-wrench",{"title":167,"icon":168,"defaultOpen":65,"path":169,"stem":170,"children":171,"page":65},"Reference","i-lucide-file-text","/reference","6.reference",[172],{"title":173,"path":174,"stem":175,"icon":168},"API Reference Guide","/reference/api","6.reference/1.api",{"title":177,"icon":126,"defaultOpen":65,"path":178,"stem":179,"children":180,"page":65},"Benchmarks","/benchmarks","7.benchmarks",[181,186,190],{"title":182,"path":183,"stem":184,"icon":185},"Benchmark Concepts","/benchmarks/benchmark-concepts","7.benchmarks/0.benchmark-concepts","i-lucide-book-open",{"title":187,"path":188,"stem":189,"icon":126},"Benchmarking & Load Testing","/benchmarks/benchmarking-load-testing","7.benchmarks/1.benchmarking-load-testing",{"title":191,"path":192,"stem":193,"children":194,"icon":203},"Benchmark Results","/benchmarks/benchmark-results","7.benchmarks/2.benchmark-results",[195,199],{"title":196,"path":197,"stem":198,"icon":97},"Local Benchmark Comparison","/benchmarks/benchmark-results/local-benchmark-comparison","7.benchmarks/2.benchmark-results/1.local-benchmark-comparison",{"title":200,"path":201,"stem":202,"icon":26},"Redis + Hybrid Benchmark Comparison","/benchmarks/benchmark-results/redis-benchmark-comparison","7.benchmarks/2.benchmark-results/2.redis-benchmark-comparison","i-lucide-chart-no-axes-combined",{"title":205,"path":206,"stem":207,"children":208,"icon":210,"defaultOpen":65},"Changelog","/changelog","8.changelog/00.index",[209,211,216,220,224,228,232,236,240,244,248],{"title":205,"path":206,"stem":207,"icon":210},"i-lucide-scroll",{"title":212,"path":213,"stem":214,"icon":215},"v3.1.0","/changelog/v3-1-0","8.changelog/01.v3-1-0","i-lucide-tag",{"title":217,"path":218,"stem":219,"icon":215},"v3.0.0","/changelog/v3-0-0","8.changelog/02.v3-0-0",{"title":221,"path":222,"stem":223,"icon":215},"v2.3.0","/changelog/v2-3-0","8.changelog/03.v2-3-0",{"title":225,"path":226,"stem":227,"icon":215},"v2.2.1","/changelog/v2-2-1","8.changelog/04.v2-2-1",{"title":229,"path":230,"stem":231,"icon":215},"v2.2.0","/changelog/v2-2-0","8.changelog/05.v2-2-0",{"title":233,"path":234,"stem":235,"icon":215},"v2.1.0","/changelog/v2-1-0","8.changelog/06.v2-1-0",{"title":237,"path":238,"stem":239,"icon":215},"v2.0.0","/changelog/v2-0-0","8.changelog/07.v2-0-0",{"title":241,"path":242,"stem":243,"icon":215},"v1.1.0","/changelog/v1-1-0","8.changelog/08.v1-1-0",{"title":245,"path":246,"stem":247,"icon":215},"v1.0.1","/changelog/v1-0-1","8.changelog/09.v1-0-1",{"title":249,"path":250,"stem":251,"icon":215},"v1.0.0","/changelog/v1-0-0","8.changelog/10.v1-0-0",{"id":253,"title":221,"authors":254,"badge":221,"body":255,"date":254,"description":697,"extension":698,"links":254,"meta":699,"navigation":700,"path":222,"seo":701,"stem":223,"__hash__":702},"docs/8.changelog/03.v2-3-0.md",null,{"type":256,"value":257,"toc":690},"minimark",[258,266,269,274,357,513,517,534,551,565,581,585,590,594,612,615,618,667,670,678,686],[259,260,261,265],"p",{},[262,263,264],"strong",{},"Status:"," Released · November 12, 2026",[259,267,268],{},"Version 2.3.0 sets a maximum age for the local state that answers a hybrid read-only call. Only\nthe hybrid provider changes.",[270,271,273],"h2",{"id":272},"added","Added",[275,276,277,326,333,351],"ul",{},[278,279,280,281,285,286,289,290,293,294,293,297,300,301,304,305,293,308,311,312,293,315,318,319,300,322,325],"li",{},"Added ",[282,283,284],"code",{},"trypema::hybrid::AllowedLag",". The default is 1 second and the minimum is 1 ms. It has\nthe same shape as ",[282,287,288],{},"SyncInterval",": ",[282,291,292],{},"milliseconds",", ",[282,295,296],{},"seconds",[282,298,299],{},"minutes",", and ",[282,302,303],{},"hours","\nconstructors that return ",[282,306,307],{},"Result",[282,309,310],{},"_or_panic"," forms, and ",[282,313,314],{},"as_milliseconds()",[282,316,317],{},"as_seconds()",",\n",[282,320,321],{},"as_minutes()",[282,323,324],{},"as_hours()"," getters.",[278,327,328,329,332],{},"Added the hybrid builder setter ",[282,330,331],{},"allowed_lag(AllowedLag)",".",[278,334,328,335,338,339,342,343,346,347,350],{},[282,336,337],{},"allowed_lag_applies_to_rejections(bool)",". The default is\n",[282,340,341],{},"false",". With ",[282,344,345],{},"true",", read-only answers from an absolute rejection cache are also at most\n",[282,348,349],{},"allowed_lag"," old. The suppressed strategy does not use this setting.",[278,352,353,354,332],{},"Added the error variant ",[282,355,356],{},"TrypemaError::InvalidAllowedLag",[358,359,364],"pre",{"className":360,"code":361,"language":362,"meta":363,"style":363},"language-rust shiki shiki-themes material-theme-lighter github-light github-dark monokai","use trypema::RateLimiterBuilder;\nuse trypema::hybrid::{AllowedLag, HybridRateLimiterProvider};\n\nlet provider = HybridRateLimiterProvider::builder(connection)\n    .allowed_lag(AllowedLag::milliseconds_or_panic(500))\n    .allowed_lag_applies_to_rejections(true)\n    .build()?;\n","rust","",[282,365,366,390,419,425,456,482,497],{"__ignoreMap":363},[367,368,371,375,379,383,386],"span",{"class":369,"line":370},"line",1,[367,372,374],{"class":373},"shWJe","use",[367,376,378],{"class":377},"sKvfc"," trypema",[367,380,382],{"class":381},"sGXK2","::",[367,384,385],{"class":377},"RateLimiterBuilder",[367,387,389],{"class":388},"swvn1",";\n",[367,391,393,395,397,399,402,404,407,410,413,416],{"class":369,"line":392},2,[367,394,374],{"class":373},[367,396,378],{"class":377},[367,398,382],{"class":381},[367,400,401],{"class":377},"hybrid",[367,403,382],{"class":381},[367,405,406],{"class":388},"{",[367,408,409],{"class":377},"AllowedLag",[367,411,412],{"class":388},",",[367,414,415],{"class":377}," HybridRateLimiterProvider",[367,417,418],{"class":388},"};\n",[367,420,422],{"class":369,"line":421},3,[367,423,424],{"emptyLinePlaceholder":33},"\n",[367,426,428,432,436,439,441,443,447,450,453],{"class":369,"line":427},4,[367,429,431],{"class":430},"srJo8","let",[367,433,435],{"class":434},"ss--_"," provider ",[367,437,438],{"class":381},"=",[367,440,415],{"class":377},[367,442,382],{"class":381},[367,444,446],{"class":445},"sD0ED","builder",[367,448,449],{"class":388},"(",[367,451,452],{"class":434},"connection",[367,454,455],{"class":388},")\n",[367,457,459,462,464,466,468,470,473,475,479],{"class":369,"line":458},5,[367,460,461],{"class":381},"    .",[367,463,349],{"class":445},[367,465,449],{"class":388},[367,467,409],{"class":377},[367,469,382],{"class":381},[367,471,472],{"class":445},"milliseconds_or_panic",[367,474,449],{"class":388},[367,476,478],{"class":477},"sYThS","500",[367,480,481],{"class":388},"))\n",[367,483,485,487,490,492,495],{"class":369,"line":484},6,[367,486,461],{"class":381},[367,488,489],{"class":445},"allowed_lag_applies_to_rejections",[367,491,449],{"class":388},[367,493,345],{"class":494},"sMTiH",[367,496,455],{"class":388},[367,498,500,502,505,508,511],{"class":369,"line":499},7,[367,501,461],{"class":381},[367,503,504],{"class":445},"build",[367,506,507],{"class":388},"()",[367,509,510],{"class":381},"?",[367,512,389],{"class":388},[270,514,516],{"id":515},"changed","Changed",[259,518,519,520,523,524,527,528,523,531,533],{},"The hybrid read-only calls are ",[282,521,522],{},"is_allowed"," and ",[282,525,526],{},"get_estimate"," on the absolute limiter, and\n",[282,529,530],{},"get_suppression_factor",[282,532,526],{}," on the suppressed limiter.",[275,535,536,542,545],{},[278,537,538,539,541],{},"They answer from accepting local state only while it is younger than ",[282,540,349],{},". Then they\nread Redis again. Concurrent calls for one key share that read. Thus an instance sees\nincrements from other instances.",[278,543,544],{},"They record no activity. A key in accepting state that is only checked becomes stale, and\ncleanup removes it.",[278,546,547,548,550],{},"For a key with no stored limit, they keep a small local entry and create no Redis key. The\nentry answers until ",[282,549,349],{}," passes. Only the cleanup loop removes it.",[259,552,553,554,557,558,560,561,564],{},"Increments reach Redis within ",[282,555,556],{},"sync_interval",". A read-only answer from accepting state or from the\nentry of a key with no stored limit is at most ",[282,559,349],{}," old. A cached rejection answers until\nits retry time ends, up to one window, unless ",[282,562,563],{},"allowed_lag_applies_to_rejections(true)"," is set.\nThe suppression cache stays bounded by the suppression-factor cache period.",[259,566,567,523,570,573,574,577,578,580],{},[282,568,569],{},"inc",[282,571,572],{},"try_inc"," decisions, the flush, and ",[282,575,576],{},"get"," do not change. ",[282,579,576],{}," always reads Redis. The\nlocal and Redis providers do not change.",[270,582,584],{"id":583},"fixed","Fixed",[275,586,587],{},[278,588,589],{},"A hybrid check of a key at its limit, with nothing pending, no longer writes an empty commit to\nRedis.",[270,591,593],{"id":592},"before-you-upgrade","Before you upgrade",[275,595,596,602,609],{},[278,597,598,599,601],{},"A hot key that is only checked now makes at most one Redis read per ",[282,600,349],{}," on each\ninstance.",[278,603,604,605,608],{},"An unknown key that is checked now keeps a small local entry until cleanup removes it. If you\ndisable cleanup, call ",[282,606,607],{},"start_cleanup_loop()",", or these entries stay in memory.",[278,610,611],{},"A key in accepting state that is only checked is now removed by cleanup. Checks no longer keep\nit alive.",[270,613,141],{"id":614},"performance",[259,616,617],{},"Criterion on an Apple M2 Pro, 2.2.1 compared with 2.3.0, Tokio runtime:",[619,620,621,637],"table",{},[622,623,624],"thead",{},[625,626,627,631,634],"tr",{},[628,629,630],"th",{},"Benchmark",[628,632,633],{},"2.2.1",[628,635,636],{},"2.3.0",[638,639,640,655],"tbody",{},[625,641,642,649,652],{},[643,644,645,646,648],"td",{},"hybrid suppressed ",[282,647,530],{},", hot key",[643,650,651],{},"about 50 ns",[643,653,654],{},"about 70 ns",[625,656,657,662,664],{},[643,658,659,660,648],{},"hybrid absolute ",[282,661,522],{},[643,663,654],{},[643,665,666],{},"about 76 ns",[259,668,669],{},"All other benchmarks stay within noise (±3 %).",[259,671,672,673,332],{},"See ",[674,675,677],"a",{"href":676},"/providers/hybrid#read-only-calls","Read-only calls",[259,679,680],{},[674,681,685],{"href":682,"rel":683},"https://crates.io/crates/trypema/2.3.0",[684],"nofollow","trypema 2.3.0 on crates.io",[687,688,689],"style",{},"html pre.shiki code .shWJe, html code.shiki .shWJe{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sKvfc, html code.shiki .sKvfc{--shiki-light:#E2931D;--shiki-light-text-decoration:inherit;--shiki-default:#6F42C1;--shiki-default-text-decoration:inherit;--shiki-dark:#B392F0;--shiki-dark-text-decoration:inherit;--shiki-sepia:#A6E22E;--shiki-sepia-text-decoration:underline}html pre.shiki code .sGXK2, html code.shiki .sGXK2{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .swvn1, html code.shiki .swvn1{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .srJo8, html code.shiki .srJo8{--shiki-light:#9C3EDA;--shiki-light-font-style:inherit;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .ss--_, html code.shiki .ss--_{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sD0ED, html code.shiki .sD0ED{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sYThS, html code.shiki .sYThS{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sMTiH, html code.shiki .sMTiH{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":363,"searchDepth":370,"depth":392,"links":691},[692,693,694,695,696],{"id":272,"depth":392,"text":273},{"id":515,"depth":392,"text":516},{"id":583,"depth":392,"text":584},{"id":592,"depth":392,"text":593},{"id":614,"depth":392,"text":141},"An allowed lag for hybrid read-only calls, so each instance sees increments from other instances.","md",{},{"icon":215},{"title":221,"description":697},"MYgVICJoWmYQu2Oz27pctIbtASEuNztzzjO4SetVUpA",[704,706],{"title":217,"path":218,"stem":219,"description":705,"icon":215,"children":-1},"One builder struct for every provider and limiter, so an application that uses one strategy builds only that limiter.",{"title":225,"path":226,"stem":227,"description":707,"icon":215,"children":-1},"Redis scripts stay below the Lua argument limit, and a cleanup pass runs each step.",1794796210110]