Re:What does it take to run a web app with 5K – 10K users?
by oisinkim on Friday January 09, 2015 @06:23PM
(#8865128)
> Logging, logging, logging - I can't stress on this enough.
There is no easier way to offload, view, filter, alert and search than logentries:
Re:What does it take to run a web app with 5K – 10K users?
by chrissnell on Friday January 09, 2015 @01:53PM
(#8863671)
Off-machine logging. There are commercial services (we're using Papertrail but there are tons of them), roll-your-own solutions (Elasticsearch-Logstash-Kibana), and simple solutions (syslog).
For an easy and simple solution, spin up a second instance and send logs to it via rsyslog over a private network interface. Most mature frameworks provide a method to send logs over syslog. It's UDP and very lightweight. Another plus: if you are compromised, you have another server with your logs and that server isn't running your vulnerable app.
Re:What does it take to run a web app with 5K – 10K users?
by clogston on Friday January 09, 2015 @03:18PM
(#8864255)
We're running the Elasticsearch, Logstash, Kibana (ELK) stack with the recommended approach i.e.:
logstash client
\
logstash client --> redis -> logstash "server" process -> elasticsearch <- kibana
/
logstash client
We have a high logging load (we log every request) due largely to IRS requirements. I've been really happy with it over the past 6 months but something that cannot be overstated is that you'll really need to become familiar with each one of the technologies used as each requires it's own setup and configuration. Not being familiar with any of them, it took me a solid 3 days to get to where the whole thing was usable and performant. Troubleshooting it is a breeze, and the whole system scales really easily, but a lot of that time was invested up front.
Re:What does it take to run a web app with 5K – 10K users?
by agib on Tuesday January 20, 2015 @11:23PM
(#8921432)
Just curious about the redis-in-the-middle. Any references so I can dig deeper?
Re:What does it take to run a web app with 5K – 10K users?
by daigoba66 on Friday January 09, 2015 @01:43PM
(#8863612)
Logging every hit will always require a lot of space. But there are some tricks you can use to "compress" it: hash long strings like the URL and user agent and store the hash as binary instead of a string. A 100+ byte string can compress to just 16 or 32 bytes depending the hash your pick. Store the hash lookup in a separate table.
Re:What does it take to run a web app with 5K – 10K users?
by mandeepj on Friday January 09, 2015 @04:51PM
(#8864751)
what is the benefit of your approach? The lookup table will still have data growth issues
Re:What does it take to run a web app with 5K – 10K users?
by tonyarkles on Saturday January 10, 2015 @03:06PM
(#8867742)
Presumably there will be many more hits than URLs, i.e. the URL table will grow much slower than the Hits table.
How do most people manage activity logs? Currently what we have set up is the user id (if the user is logged in), IP address, URL they hit, user agent, and timestamp are all inserted into an activity logs table. For one particular site with an API that's being polled the size of the DB grew pretty large.