server

I/O multiplexing: select, poll and epoll in Linux

1.0 I/O multiplexing I/O multiplexing is the the ability to perform I/O operations on multiple file descriptors. Input operations like read, accept and calls for receiving messages block when there is no incoming data. So, if an input call is made and it blocks, we may miss data from other file descriptors. To circumvent this, …

I/O multiplexing: select, poll and epoll in Linux Read More »

Interprocess Communication using Unix Domain Sockets

1.0 Unix Domain Sockets A socket is a communication endpoint at a host computer. The socket API provides calls for communication between processes. The socket system call is, int socket (int domain, int type, int protocol); The first parameter to the socket system call is the domain. The domain is actually the communication domain and …

Interprocess Communication using Unix Domain Sockets Read More »

Analyzing the NGINX web server log file

1.0 Introduction Given an nginx web server log file, we might like to know who are the visitors to our website. One can go line by line through the log file, but that is tedious. It would be nice if we can get one line per client visiting the website, giving the IP address of …

Analyzing the NGINX web server log file Read More »

Syslog

1.0 Syslog Syslog is a protocol for conveying event notification messages. Syslog was first developed by Eric Allman for logging as a part of the Sendmail project in the 1980s. It soon became a de-facto standard for logging on Unix-like systems. Syslog was formally specified in RFC 3164 in 2001 as “The BSD syslog Protocol” …

Syslog Read More »

System V message queues in Linux

1.0 Message queues Message queues are one of the interprocess communication mechanisms available under Linux. Message queues, shared memory and semaphores are normally listed as the three interprocess communication mechanisms under Linux. Semaphores, though, are really for process synchronization. In practice, shared memory, aided by semaphores, makes an interprocess communication mechanism. Message queues is the …

System V message queues in Linux Read More »

Using Git

1.0 Introduction Git commands for common source code management use cases are listed. 2.0 Install Git On an Ubuntu Linux system, Git can be installed with the command, $ sudo apt-get install git 3.0 Set Identity Before using Git, the user's identity (name, email) has to be set $ git config –global user.email “user1@example.com” $ …

Using Git Read More »

Getting WordPress to work with Varnish 4.0

With Varnish 4.0, the VCL has changed. So an update from Varnish 3 .0 to Varnish 4.0 requires a change in the VCL file, /etc/varnish/default.vcl. As a part of Varnish cache server configuration for a WordPress based site, using nginx web server, the following VCL is required in /etc/varnish/default.vcl for dropping cookies sent to WordPress …

Getting WordPress to work with Varnish 4.0 Read More »