Join our Newsletter — 33% off our NHI Course
Home› Glossary› Foundations & NHI Taxonomy› Fake Request
Foundations & NHI Taxonomy

Fake Request

← Back to Glossary
By NHI Mgmt Group Updated September 24, 2026 Domain: Foundations & NHI Taxonomy

A fake request is an internal request-like object created to run a timer callback in OpenResty. It behaves enough like a normal request to execute work, but it still consumes memory and connection resources. When many timers are active, these fake requests can become a major source of overhead.

What Fake Requests Are Doing

In OpenResty, fake requests are not user-initiated traffic. They are internal request-like objects created so timer callbacks can run inside a request execution model, which lets background work reuse familiar request machinery.

The important distinction is that a fake request is operational scaffolding, not application traffic. It exists to provide an execution context, so its cost profile is tied to runtime orchestration rather than response handling or routing.

Why Fake Requests Exist in OpenResty

Timers in OpenResty need a context in which Lua code can execute. Fake requests supply that context, allowing scheduled work to run without an inbound client request and without forcing the timer logic to live outside the request lifecycle model.

This design is useful because it keeps timer execution consistent with the rest of the runtime. The trade-off is that every active timer still needs supporting request-like state, so large timer populations introduce overhead that must be understood as part of the execution model itself.

Resource Overhead and Scaling Behaviour

Fake requests consume memory and connection resources even though they are not real client requests. That means timer-heavy deployments can experience pressure from the sheer number of internal request object, especially when timers are long-lived, numerous, or created in bursts.

The scaling issue is not that fake requests are inherently dangerous, but that their overhead accumulates with concurrency. As timer count grows, these internal objects can compete with normal request handling for resources, which can affect efficiency and capacity planning.

In practice, the overhead becomes most visible when timer usage is treated as free background work. It is not free, it is just hidden behind the request abstraction.

How to Think About Fake Requests Operationally

Fake requests should be viewed as part of the runtime cost of using timers in OpenResty. Their value is that they make asynchronous work possible within a request-oriented environment; their limitation is that they are still real objects with finite resource consumption.

That balance matters when designing timer-based features, because the right question is not simply whether the timer callback works, but whether the number and duration of those callbacks remain acceptable at production scale.

Well-run systems treat fake request overhead as a capacity concern, not just an implementation detail.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 24, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org