Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/conat/core/constants.ts
1452 views
1
// This is just the default with socket.io, but we might want a bigger
2
// size, which could mean more RAM usage by the servers.
3
// Our client protocol automatically chunks messages, so this payload
4
// size ONLY impacts performance, never application level constraints.
5
const MB = 1e6;
6
export const RESOURCE = "connections to CoCalc";
7
8
export const MAX_PAYLOAD = 8 * MB;
9
10
export const MAX_SUBSCRIPTIONS_PER_CLIENT = 500;
11
12
// hubs must have a much larger limit since they server everybody...
13
export const MAX_SUBSCRIPTIONS_PER_HUB = 15000;
14
15
export const MAX_CONNECTIONS_PER_USER = 100;
16
export const MAX_CONNECTIONS = 10000;
17
18