A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.service.DeadlineFilter module.
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.service.DeadlineFilter module.
Maximum fraction of requests that can be
rejected over rejectPeriod
. Must be between 0.0 and 1.0.
Creates a com.twitter.finagle.Stackable com.twitter.finagle.service.DeadlineFilter.
DeadlineFilter provides an admission control module that can be pushed onto the stack to reject requests with expired deadlines (deadlines are set in the TimeoutFilter). For servers, DeadlineFilter.module should be pushed onto the stack after the stats filters so stats are recorded for the request, and before TimeoutFilter where a new Deadline is set. For clients, DeadlineFilter.module should be after the stats filters; higher in the stack is preferable so requests are rejected as early as possible.
Deadlines cross process boundaries and can span multiple nodes in a call graph. Even if a direct caller doesn't set a deadline, the server may still receive one and thus potentially fail the request. It is advised that all clients in the call graph be well prepared to handle NACKs before using this.