Question

Analyzing / Preventing Bandwidth Spikes

Posted August 13, 2019 796 views
LAMP StackDigitalOceanUbuntu 18.04

I just had a huge spike in bandwidth, which seems to have cause spikes in all else - RAM, CPU, Disk I/O. It caused the site to go down for a few minutes. I looked at my Google Analytics data and there was no particular user activity at that time.

I have LAMP stack (wordpress backend), with Nginx reverse proxy. Nodejs is doing rendering. It’s a headless wordpress.

How can I analyze what caused this bandwidth spike?

I suspect it could be a scraper. I am disallowing some scrapers from my robots.txt, but obviously not all scrapers are going to obey that. What would be a way to deal with that situation at digitalocean? A firewall?

Another suspicion I have it could be due to Digital Ocean backup. It was scheduled for today - I wonder if anyone has run into a similar issue with backups.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello,

What I would suggest here is going through your Apache access logs for that day and check if there were any suspicious requests.

Also you could try using this script here to summarize your access logs:

https://github.com/bobbyiliev/quick_access_logs_summary

It would give you the following information:

  • Top 20 POST requests
  • Top 20 GET requests
  • Top 20 IP logs and their geo location

That way you would be able to tell for sure if you had a spike in the traffic.

Regarding the backup, what I could suggest is that you could try taking a manual snapshot and monitor the resource utilization on your server to try and replicate the problem.

Hope that this helps!
Regards,
Bobby

Submit an Answer