Compressed requests through gateway are really slow

I have a situation where requests through my Gateway/VirtualService are really slow, but only if compressed. My backend is serving responses in ~10ms but externally that’s about >4s if compressed or <200ms if not compressed.

The file in question is bootstrap.css (~175kB/20k compressed).

curl 'https://myserver/css/bootstrap.css' -o /dev/null -w "%{time_starttransfer}\n"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  175k  100  175k    0     0   902k      0 --:--:-- --:--:-- --:--:--  906k
0.135060

Or if compressed

curl 'https://myserver/css/bootstrap.css' -o /dev/null --compressed -w "%{time_starttransfer}\n"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18273    0 18273    0     0   3784      0 --:--:--  0:00:04 --:--:--  3850
4.826328

Can anyone shed some light on where to start looking to solve this issue?