vigour-io/shutter

Drops requests under not-so-high load

Opened this issue · 2 comments

When building vigour-example for ios, some image resize requests result in 408 or 504 (timeout related errors). This is happening under not-so-high load (21 simultaneous POSTs, including large files)

The requesting side should retry on timeout, but let's make sure we're doing everything possible to mitigate this.

  • find a way to detect the issue in advance and respond to subsequent requests with retry-after
  • check for other relevant http headers
  • optimize timeout settings (express?)
  • optimize pooling settings (express?)
  • start response before image is ready to get more time from the requester?

manip function should either turn socket pooling off or, prefferably, increase maxSockets. This should also be benchmarked to prove it helps.

We should also use gzip, both when retrieving the original image and when sending the result back to the caller