Varnish and NodeJS

Posted by on Apr 11, 2014 in Server Monitoring, Varnish | No Comments
Varnish and NodeJS

So after having a bit of a play around with NodeJS and Socket IO I am quite liking it, so now in the process of moving the backend queries over to NodeJS.  Currently I have setup the following:

  • Alerting of events to all clients
  • Alerting of change of state of backends to all clients
  • Pushing of varnishstat output every 5 seconds to all connected clients
  • Pushing of CPU/Memory/Disk stats every 5 seconds to all connected clients
  • Pushing updates to the ban lists
  • Pushing out updates to VCLs loaded

Now that I have the varnishstats being pushed regularly I’m going to add a realtime graph showing a few different metrics at a bit higher resolution to the current data that I’m pulling from the database, this will be very similar to the CPU/Memory/Disk graphs that I have.  One of the items I could add which would probably be nice is the hits per second value.

Realtime server stats

Realtime server stats

Realtime hits

One of the items that I want to do next use the data that I’m collecting from my varnishncsa output, so with this I should be able to show the last x number of hits, last x number of misses, or any number of different queries.  One of the things that I’m not sure about on this though is the what the performance would be like on a high throughput site as this file can grow pretty quick in size when you have lots of visitors.

 

Leave a Reply