Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Romain's avatar
Level 30

How to calculate Job bandwidth consumption?

Hey there,

if I have a job (or simply a request) that fetches resources from another website, say another API or RSS feed or even a full HTML page. How can I calculate how much bandwidth is used?

I wouldn't want to blow up my hosting bandwidth, so if I can calculate that and potentially put alarms it would be good. I know I can setup alarms in AWS but I'd like my app to be in charge of that.

Thanks

0 likes
1 reply
bugsysha's avatar
$response = \Illuminate\Support\Facades\Http::get('google.com');
$size = strlen($response->body());
1 like

Please or to participate in this conversation.