Skip to main content

ProxySection

Struct ProxySection 

Source
pub struct ProxySection {
    pub calls_per_minute: Option<u32>,
    pub burst_calls: Option<u32>,
    pub in_flight_per_account: Option<usize>,
    pub in_flight_per_tree: Option<usize>,
    pub in_flight_total: Option<usize>,
    pub target_cache_secs: Option<u64>,
    pub target_cache_entries: Option<usize>,
    pub app_view: Option<String>,
}
Expand description

What one account may spend of atproto-proxy, which forwards a call to whatever service a DID document names, from this server’s address.

Reload: needs a restart. The values are read once, into the router.

Fields§

§calls_per_minute: Option<u32>

How many proxied calls one account’s budget refills by each minute.

Reasonable range: 1 to 6000. Sixty, the default, is one a second sustained: far above the few calls a minute an agent makes, and the most one account can make a third party see from this server’s address. A call over it is refused 429 with Retry-After.

§burst_calls: Option<u32>

How 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: Option<usize>

How many of one account’s proxied calls may be open at once.

Reasonable range: 1 to 64. Eight, the default, is more than an agent opens at once, and a sixteenth of in_flight_total.

§in_flight_per_tree: Option<usize>

How many proxied calls may be open at once across one account tree: an account the 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: Option<usize>

How many proxied calls may be open at once across every account.

Reasonable range: 1 to 512. 128, the default, is a quarter of the 512 requests this server serves at once. One creator may hold thousands of accounts, and this keeps their calls to a service that never answers from holding the rest. A per-account cap above it has no effect.

§target_cache_secs: Option<u64>

How long the endpoint a target’s DID document names is kept, in seconds.

Reasonable range: 10 to 3600. Five minutes, the default, fetches a document once for every few hundred calls to it, and reaches a service that moved within five minutes. Every call still checks the addresses the endpoint resolves to.

§target_cache_entries: Option<usize>

How 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 the services a deployment’s agents call in a few megabytes.

§app_view: Option<String>

Where an app.bsky.* call with no atproto-proxy header goes, as that header names a service: did#service, such as did:web:api.bsky.app#bsky_appview. The call is authorized and signed as a proxied call to that service is.

Unset, the default, sends such a call nowhere: it is MethodNotImplemented.

Trait Implementations§

Source§

impl Clone for ProxySection

Source§

fn clone(&self) -> ProxySection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProxySection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProxySection

Source§

fn default() -> ProxySection

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ProxySection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ProxySection

Source§

fn eq(&self, other: &ProxySection) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ProxySection

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ProxySection

Source§

impl StructuralPartialEq for ProxySection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,