Commit f1b6f6c
committed
Low-hanging fruit for performance improvements in usage reporting
- Drop references to unencoded and uncompressed versions of reports as
soon as they are no longer needed, to hopefully allow garbage
collection to be more effective during the HTTP POSTs.
- Simplify compression code to no longer require a workaround for Node
v6 (we require Node v14!), and use `util.promisify`.
- Add a timeout to the report POST. The default is 30 seconds, which is
currently the timeout enforced by Apollo's load balancers; a smaller
number may be advisable for high traffic users facing memory
constraints. This uses the AbortController API (which should be
supported by most Fetcher implementations). We use the
`node-abort-controller` polyfill (same polyfill we chose for
`@apollo/gateway`) because Node's built-in global AbortController
requires an experimental flag in Node v14.
Fixes #7100.1 parent 4881198 commit f1b6f6c
File tree
7 files changed
+87
-43
lines changed- .changeset
- packages
- integration-testsuite/src
- server
- src/plugin/usageReporting
7 files changed
+87
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2225 | 2225 | | |
2226 | 2226 | | |
2227 | 2227 | | |
2228 | | - | |
| 2228 | + | |
2229 | 2229 | | |
2230 | 2230 | | |
2231 | | - | |
2232 | | - | |
2233 | 2231 | | |
2234 | 2232 | | |
2235 | | - | |
| 2233 | + | |
| 2234 | + | |
2236 | 2235 | | |
2237 | 2236 | | |
2238 | 2237 | | |
2239 | 2238 | | |
2240 | 2239 | | |
2241 | 2240 | | |
2242 | | - | |
| 2241 | + | |
2243 | 2242 | | |
2244 | 2243 | | |
2245 | 2244 | | |
| |||
2277 | 2276 | | |
2278 | 2277 | | |
2279 | 2278 | | |
| 2279 | + | |
| 2280 | + | |
2280 | 2281 | | |
2281 | 2282 | | |
2282 | 2283 | | |
| |||
2292 | 2293 | | |
2293 | 2294 | | |
2294 | 2295 | | |
2295 | | - | |
| 2296 | + | |
2296 | 2297 | | |
| 2298 | + | |
2297 | 2299 | | |
2298 | 2300 | | |
2299 | 2301 | | |
2300 | 2302 | | |
2301 | 2303 | | |
2302 | 2304 | | |
2303 | | - | |
| 2305 | + | |
2304 | 2306 | | |
2305 | 2307 | | |
2306 | 2308 | | |
2307 | 2309 | | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
2308 | 2314 | | |
2309 | 2315 | | |
2310 | 2316 | | |
2311 | 2317 | | |
2312 | 2318 | | |
2313 | 2319 | | |
2314 | 2320 | | |
2315 | | - | |
| 2321 | + | |
2316 | 2322 | | |
2317 | 2323 | | |
2318 | 2324 | | |
| |||
2322 | 2328 | | |
2323 | 2329 | | |
2324 | 2330 | | |
2325 | | - | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
2326 | 2335 | | |
2327 | 2336 | | |
2328 | 2337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
240 | | - | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
257 | | - | |
| 261 | + | |
258 | 262 | | |
259 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
260 | 267 | | |
261 | 268 | | |
262 | 269 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
291 | 285 | | |
292 | 286 | | |
293 | 287 | | |
294 | 288 | | |
295 | 289 | | |
296 | 290 | | |
297 | 291 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
309 | 314 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| |||
0 commit comments