SIGN IN SIGN UP
TryGhost / Ghost UNCLAIMED

Independent technology for modern publishing, memberships, subscriptions and newsletters.

0 0 119 JavaScript

Added shared keep-alive agent to external HTTP requests

ref https://linear.app/ghost/issue/BER-3690

- got.extend in request-external.js had no agent configured, so every
oEmbed / webmention / recommendation / image probe opened a fresh socket
- on a NAT-gatewayed VPC this holds the gateway at its connection-rate
ceiling and causes port-collision drops that gateway sizing won't fix
- adds a shared http/https Agent (keepAlive: true, keepAliveMsecs: 60s,
maxSockets: 256) wired into the central got instance
- routes probe-image-size through externalRequest.stream so the parallel
cover/author/og/twitter/logo fetches from meta/image-dimensions.js reuse
the same pool (and pick up the existing SSRF protections)
R
Ricardo Pinto committed
37aab9982acc55a8b26b4c8b28f9ceb3f4ea1a3f
Parent: 6085641