Will mysql Insert slow page down if its used on every request? PHP
I have a MVC framework that has a Request class which handles all
requests. I log each request that comes in the database and the columns
for the request log table is as follows:
ID (auto-increment)
Controller
Action
Params (GET, POST, PUT, DELETE)
Params (MVC params delimited by slash "/")
Request Method (GET, POST, PUT, DELETE)
Request Type (HTML, JSON, XML)
Is Request Ajax (true/false)
Referer URL
Request URI
Browser (User Agent Browser)
Browser Version
IP
Platform
Request Time (datetime)
Now that I think about it, if I have 100+ users online, each one making
around 500+ requests a day I get 100*500 = 50,000 rows per day and per
year it comes out around 18 Million.
Now after 1-2 years if I dont clear the log, will it be slower for users
to insert their request into the table?
Is it bad idea to log every request?
Reason: the reason i want to log every request is to detect kind of DDOS
attack so that if there are more than 10 requests per 30 seconds lock
account for 20 minutes.
No comments:
Post a Comment