🪟 Windows TippsTop 5 Ways to Enable Hibernate Mode on Windows 11(01.09.2026 um 04:41 Uhr)
⚠️ Malware / Trojaner / VirenPost-DEF CON phishing campaign delivered AMOS and NetSupport malware(24.08.2026 um 09:42 Uhr)
🕵️ SicherheitslückenCritical Ruby on Rails Vulnerability Under Active Attack | CVE-2026-66066(02.09.2026 um 06:41 Uhr)
🕵️ SicherheitslückenHow to Write Bug Bounty Report That Gets Paid (2026)(02.09.2026 um 18:57 Uhr)
⚠️ Malware / Trojaner / VirenWhat is GRC in Cybersecurity? A Complete Beginners Guide (2026)(03.09.2026 um 16:37 Uhr)
🔧 AI Nachrichten Breaking| MAJOR GLOBAL AI OUTAGE: ChatGPT, Claude, and Grok Down(03.09.2026 um 17:31 Uhr)
🕵️ SicherheitslückenArista warns customers ahead of next week’s security disclosures(02.09.2026 um 23:34 Uhr)
🔧 AI Nachrichten Every agent call is a trust decision you're not making.(11.08.2026 um 20:25 Uhr)
🪟 Windows TippsTop 5 Ways to Enable Hibernate Mode on Windows 11(01.09.2026 um 04:41 Uhr)
⚠️ Malware / Trojaner / VirenPost-DEF CON phishing campaign delivered AMOS and NetSupport malware(24.08.2026 um 09:42 Uhr)
🕵️ SicherheitslückenCritical Ruby on Rails Vulnerability Under Active Attack | CVE-2026-66066(02.09.2026 um 06:41 Uhr)
🕵️ SicherheitslückenHow to Write Bug Bounty Report That Gets Paid (2026)(02.09.2026 um 18:57 Uhr)
⚠️ Malware / Trojaner / VirenWhat is GRC in Cybersecurity? A Complete Beginners Guide (2026)(03.09.2026 um 16:37 Uhr)
🔧 AI Nachrichten Breaking| MAJOR GLOBAL AI OUTAGE: ChatGPT, Claude, and Grok Down(03.09.2026 um 17:31 Uhr)
🕵️ SicherheitslückenArista warns customers ahead of next week’s security disclosures(02.09.2026 um 23:34 Uhr)
🔧 AI Nachrichten Every agent call is a trust decision you're not making.(11.08.2026 um 20:25 Uhr)

26 🕛 kürzlich 2 Min Lesezeit
0

Per-feature quota in Apify KeyValueStore — no DB, no cron, no drift

↗ Quelle (dev.to)
🗣️ Stimme:

The reflex when you hear "quota" is to reach for a database plus a cron job. For a small, self-maintained Actor I care more about complexity: the heavier the system, the harder it is to keep stable for months.



For this project I went with KeyValueStore plus a month-key. The goals were clear:




  • Meter per feature, not just total invocations

  • Reset naturally each month — no scheduled job

  • Keep the logic in one place so it doesn't drift



The trick is in the key layout. Conceptually:




CODE
quota:{tenant}:{feature}:2026-05






When a new month starts, you write to a new key. You don't wipe the old one. "Reset" becomes a naming switch, not a data migration. No month-end task can fail, and you don't have to think about timezone edges either.



Per-feature matters because feature cost varies wildly. If you only meter the total, heavy features crowd out light ones, and everyone ends up feeling like the limit is unfair.



The discipline in quota.py is small but strict:




  • Check the limit before doing the work

  • Only record after the operation actually succeeds

  • Keep the key format fixed — no variants

  • On failure, do not write a guess



"No drift" isn't an algorithmic property. It's a write-semantics property. The moment your counter writes are scattered across modules — each doing it slightly differently — you've already lost.



This design is not universal. It fits products with low-to-medium complexity, multi-tenant but with bounded concurrency. If you later outgrow it, swapping in a real metering pipeline is a clean migration, because the surface is small.



My one piece of advice: get the quota schema right in the first version. Adding it later almost always drags pricing, routing, and error semantics into the rewrite with it.






Related



If you're building SMB automation services, the n8n SMB Automation Pack ($29) pairs nicely with this pattern — quota, retries, and notifications all live in one operable flow.




  • GitHub repo:






Previous notes in this series:



Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 39%
🟡 In Evaluierung 27%
🟢 Keine Auswirkung 11%
Spannende Innovation 23%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Top 5 Ways to Enable Hibernate Mode on Windows 11
1 Quelle
Post-DEF CON phishing campaign delivered AMOS and NetSupport malware
1 Quelle
Critical Ruby on Rails Vulnerability Under Active Attack | CVE-2026-66066
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Per-feature quota in Apify KeyValueStore — no DB, no cron, no drift

Thematisch verwandte Begriffe: Perfeature, quota, Apify, KeyValueStore · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...