merge: Fix rate limits under multi-node environments (!809)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/809 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ export const meta = {
|
||||
allowGet: true,
|
||||
cacheSec: 60 * 60,
|
||||
|
||||
// 10 calls per 5 seconds
|
||||
// Burst up to 100, then 2/sec average
|
||||
limit: {
|
||||
duration: 1000 * 5,
|
||||
max: 10,
|
||||
type: 'bucket',
|
||||
size: 100,
|
||||
dripRate: 500,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user