pub struct ProxySettings {
pub calls_per_minute: u32,
pub burst_calls: u32,
pub in_flight_per_account: usize,
pub in_flight_per_tree: usize,
pub in_flight_total: usize,
pub target_cache_ttl: Duration,
pub target_cache_entries: usize,
pub app_view: Option<String>,
}Expand description
The bounds on proxied calls, and where an app.bsky.* call with no
atproto-proxy goes; see ProxyLimits.
Fields§
§calls_per_minute: u32How many proxied calls one account’s budget refills by each minute.
Reasonable range: 1 to 6000. Sixty, the default, is one a second sustained: a hundred times the few calls a minute an agent makes, and the most one account can make a third party see from this server’s address.
burst_calls: u32How many proxied calls one account may make at once from a full budget.
Reasonable range: 1 to 1000. Sixty, the default, covers a client that opens a view by fanning out a few dozen calls.
in_flight_per_account: usizeHow many of one account’s proxied calls may be open at once, from the request to the last byte of the answer.
Reasonable range: 1 to 64. Eight, the default, is more than an
agent opens at once, and keeps one account to a sixteenth of
in_flight_total.
in_flight_per_tree: usizeHow many proxied calls may be open at once across one account tree: an account this server’s operator admitted, and every account created beneath it.
Reasonable range: 1 to 512. 64, the default, is half of
in_flight_total, so one creator’s accounts leave half for every
other tree. A per-tree cap at or above in_flight_total has no
effect.
in_flight_total: usizeHow many proxied calls may be open at once across every account.
Reasonable range: 1 to 512. 128, the default, is a quarter of
crate::MAX_CONCURRENT_REQUESTS, so however many accounts call a
stalled service, three quarters of the request permits stay free
for everything else. A per-account cap above it has no effect.
target_cache_ttl: DurationHow long the endpoint a target’s DID document names is kept.
Reasonable range: 10 to 3600 seconds. Five minutes, the default, fetches a document once for every few hundred calls an agent makes to it, and a service that moves is reached at its new address within five minutes.
target_cache_entries: usizeHow many targets’ endpoints are kept, the least recently used dropped first.
Reasonable range: 16 to 100_000. An entry is a few kilobytes at most. 1024, the default, holds every service a deployment’s agents call in common use, in a few megabytes.
app_view: Option<String>The service an app.bsky.* call with no atproto-proxy header is
sent to, as that header would name it: did#service, such as
did:web:api.bsky.app#bsky_appview. The reference PDS sends these
calls to its configured app view the same way.
None, the default, sends nowhere: such a call is
MethodNotImplemented.
Implementations§
Trait Implementations§
Source§impl Clone for ProxySettings
impl Clone for ProxySettings
Source§fn clone(&self) -> ProxySettings
fn clone(&self) -> ProxySettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProxySettings
impl Debug for ProxySettings
Source§impl Default for ProxySettings
impl Default for ProxySettings
Source§impl PartialEq for ProxySettings
impl PartialEq for ProxySettings
Source§fn eq(&self, other: &ProxySettings) -> bool
fn eq(&self, other: &ProxySettings) -> bool
self and other values to be equal, and is used by ==.impl Eq for ProxySettings
impl StructuralPartialEq for ProxySettings
Auto Trait Implementations§
impl Freeze for ProxySettings
impl RefUnwindSafe for ProxySettings
impl Send for ProxySettings
impl Sync for ProxySettings
impl Unpin for ProxySettings
impl UnsafeUnpin for ProxySettings
impl UnwindSafe for ProxySettings
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more