pub struct HttpLimitsConfig {
pub max_body_bytes: usize,
pub header_read_timeout: Duration,
pub body_read_timeout: Duration,
pub upstream_connect_timeout: Duration,
pub upstream_timeout: Duration,
pub max_upstream_response_bytes: usize,
}Expand description
Resource limits for the HTTP listener (health, chain reads, program reads, fork reads) and its read RPC client.
Every limit applies before authentication can reject a request, so each one bounds what an unauthenticated client can make the process hold.
Fields§
§max_body_bytes: usizeLargest JSON request body accepted; larger bodies get 413. ARETE_HTTP_MAX_BODY_BYTES.
header_read_timeout: DurationTime allowed to receive a request’s headers before the connection is closed.
ARETE_HTTP_HEADER_TIMEOUT_MS.
body_read_timeout: DurationTime allowed to receive a request body once its handler starts reading it.
ARETE_HTTP_BODY_TIMEOUT_MS.
upstream_connect_timeout: DurationTime allowed to connect to the read RPC. ARETE_READ_RPC_CONNECT_TIMEOUT_MS.
upstream_timeout: DurationTime allowed for one read RPC call, response body included. ARETE_READ_RPC_TIMEOUT_MS.
max_upstream_response_bytes: usizeLargest read RPC response body accepted; larger responses fail as a 502.
ARETE_READ_RPC_MAX_RESPONSE_BYTES.
Implementations§
Trait Implementations§
Source§impl Clone for HttpLimitsConfig
impl Clone for HttpLimitsConfig
Source§impl Debug for HttpLimitsConfig
impl Debug for HttpLimitsConfig
Source§impl Default for HttpLimitsConfig
impl Default for HttpLimitsConfig
impl Eq for HttpLimitsConfig
Source§impl PartialEq for HttpLimitsConfig
impl PartialEq for HttpLimitsConfig
impl StructuralPartialEq for HttpLimitsConfig
Auto Trait Implementations§
impl Forget for HttpLimitsConfig
impl Freeze for HttpLimitsConfig
impl RefUnwindSafe for HttpLimitsConfig
impl Send for HttpLimitsConfig
impl Sync for HttpLimitsConfig
impl Unpin for HttpLimitsConfig
impl UnsafeUnpin for HttpLimitsConfig
impl UnwindSafe for HttpLimitsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.