Posts

Showing posts from July, 2012

Varnish Cache Purge, Ban and Ban Lurker

Lets walk through some basics of varnish before understanding purge and ban Varnish? From DOC : Varnish is a web application accelarator. Varnish can cache & serve all your static properties [css, js, images, parsed PHP pages, HTML] Reduces load on the webservers even on high traffic. Can act as a load balancer even [provided with proper director configurations]. Varnish uses VCL [Varnish Configuration Language] to override the defaults and tweak varnish based on usecase Varnish caches contents [cache object] against a key. By Default the key is Hash(HostName and Request URL) We can override the defaults by editing vcl_hash sub-routine in vcl file Do Cache objects live long in varnish? In varnish every cache object is stored against a ttl value. Every object will be auto-magically removed out of cache once they reach the expiry. TTL can be configured globally as default while starting varnishd with -t option . Also can be overridden in VCL using bresp.ttl va

npm - package manager for node and package.json a overview

npm: node package manager [!an acronym :P] Till the time I got to know about this guy, code upload across servers use to be a tough task. He is the one to look out incase you are to develop an application in node and host it across servers package.json is his weapon ;) In this article I'm just planning to touch npm basics and use of package.json and it is tl;dr ;) What is npm? From here : npm is a package manager for node. You can use it to install and publish your node programs. It manages dependencies and does other cool stuff. Basically node uses commonjs style module system. Every module is an independent piece of javascript code which can be plugged in and out of the core of your application. Modules can be custom built or built for a generic purpose like redis, mysql, async, log4js. And it will be always good to know if there are any pre-built modules available for our need before we start building our own. npm does it for you like a charm :) How do I instal