Score:0

Apache Reverse Proxy BandWidth Mismatch

mp flag

I have a fleet of Apache reverse proxy in AWS . I see Access logs of my reverse proxy is always under reporting bytes IN and bytes Out when compared to what is noticed in origin server logs as well as Network flow logs.

Troubleshooting this issue i was wondering if anything relating to compression can be root cause of such issue? Since my setup is reverse proxy and i would want all contents coming IN and going OUT to be compressed

request

a) request sent from the client to apache reverse proxy

b) same request forwarded from apache reverse proxy to the upstream/origin server

response

a) response sent from the upstream/origin server to the apache reverse proxy

b) same response sent from apache reverse proxy to the client

How can i apply for compression for all possible MIME types. I have brotli module installed in my apache reverse proxy so ideally i am looking for a way to check if client support brotli if not fall back to default gzip.

Since i feel i have double checked mostly other possible issues here i am assuming compression as one possible issue if you anyone is aware of any other possibility for such issues please let me. I have been struggling with issue from more then 6 months now and we see around 30% gap in what we see in Apache Access logs vs whats origin server has sent.

So incase anyone has any thoughts or experience troubleshooting such issue please help me out.

LogFormat "%a %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" "%{cache-status}e" %I %O %D "%{SSL_PROTOCOL}x" [hostname "%{Host}i"] ]" combinedd

My Setup: AWS NLB ---> Apache Reverse Proxy in Private Subnet ----> NAT Gateway -----> origin/upstream Server in Internet

Server version: Apache/2.4.53 (Ubuntu)

djdomi avatar
za flag
well there can be a lot of differences due the 1000/1024 calculation, did you thinked about it?
thisis2394 avatar
mp flag
thanks for the reply...yeah during my initial troubleshooting i checked that part as well but unfortunately we are seeing gap in raw bytesIN and bytesOut captured in the apache access logs
John Hanley avatar
cn flag
Apache only reports application-layer traffic. Network traffic has more data attached to manage and route traffic (IP frames, layer 2 frames, etc). Take a look at an OSI model for network layers to understand where Apache fits into the overall networking scheme.
thisis2394 avatar
mp flag
Yeah i agree apache might not be taking into account the networking level overhead, but our gap itslef is so huge that i beleive it cannot be a networking level thing alone. something is going on at layer 7 itself which i am failing to understand. As of now my doubt lies on compression. so we have brotli enabled by default in apache reverse proxy but origin usually send it as gzip. Like this we beleive there might be serveral other factors which is leading up to this gap
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.