Gerhard Lazu
๐ค SpeakerAppearances Over Time
Podcast Appearances
So why is more traffic coming into the instance than going out?
So this is the traffic that the instance is receiving.
So we're receiving 2.29 gigabits, which we're only sending 145 megabits.
Now is a good time to pause and think.
about why this is happening.
The Varnish instance, yeah.
All our backends, and we have a couple of backends.
just a ddos i mean what is it i don't know yeah so it is a ddos but it's specifically downloading mp3 files or starting to download mp3 files but never finishing hanging right so you get like all these requests for mp3 files for large files varnish is going and fetching them as quickly as it can so pulling all this data in so it has in memory but the client is never around long enough yeah
Exactly.
So they basically abort, but Varnish is still pulling in all the data.
Now there is a property.
It's called bresp.doStreamTrue.
So what this does, very weird thing, it tells Varnish not to buffer the entire backend response if the client is slow, right?
So I'm not going to fetch the entire MP3 file if you only want the first, I know, minute or two or a range or something like that.
Now this is on by default.
So by default, that's how Varnish behaves.
So we wouldn't need to enable this.
But if the object is uncacheable, it cannot be stored in cache.
You see where I'm going with this?
Memory, you can't store it in memory.