Durable Objects bill wall-clock time in memory, not the work done. The timers, sockets and undeleted objects that keep the meter running, and the fixes.
Durable Objects billing follows the time an object spends in memory, not the time it spends working, so the bill can be far larger than the work behind it. An object that finishes its job in two seconds keeps billing for as long as something inside it is still pending: a timer, an open promise, a WebSocket accepted the old way. Objects that nobody deletes add a second cost that only grows. Both are easy to recognise once you look at the right numbers. Divide the seconds billed by the number of wake-ups: if the result sits near some time-out in your code instead of near the length of the job, a timer is holding the object. If the count of objects rises and never falls, something creates…
Read the full report on AISkills402: https://aiskills402.com/blog/durable-objects-billing-what-keeps-object-awake?utm_source=devto&utm_medium=social
Top comments (0)