Red Crackle Blog

How to detect which module creates a session cookie

By neerav.mehta Fri, 09/19/2014 - 18:52 4 Comments

A good number of Drupal sites use front-end Varnish proxy to ensure pages load faster. The most commonly used Varnish configuration caches pages for anonymous users and lets requests with cookies pass through to the backend. At times, a contributed module updates the

How to install and configure GlusterFS Server on Ubuntu

By neerav.mehta Thu, 09/18/2014 - 09:30 3 Comments

GlusterFS is a distributed File System. In this article, we'll show you how to create and configure GlusterFS Server on three nodes. You can create different types of GlusterFS volumes. We will only show you how to configure a replicated volume so that if you store a file on one machine, it will get replicated to all the nodes in the cluster. Suppose the hostnames of the three servers on which we want to install GlusterFS server are <hostname-1>, <hostname-2> and <hostname-3>.

How to kill an unresponsive process in Unix

By neerav.mehta Wed, 09/17/2014 - 13:26 Comments

I am sure you would have come across Windows' processes that hang. And I am sure you know what to do. CTL + ALT + DEL and kill the process using the Task Manager. In this article, we'll how to do that on Unix using command line.

Here are the steps:

1) See the PID of the process that has hung and you want to kill. Execute the following command in the terminal.

ps aux

This command will list all the processes running on your system. Here is the format:

How to use Drupal 7 with MySQL master-slave setup

By neerav.mehta Mon, 09/15/2014 - 21:02 Comments

Drupal 7 has made it very easy to use it with MySQL master-slave setup. Assume that we have 3 MySQL servers configured in master-slave mode. In this article, we'll show you how to configure Drupal's settings.php so that it uses the three MySQL servers.

In settings.php, start with the MySQL master configuration. Replace mysql-master-db, mysql-master-username, mysql-master-password and mysql-master-IP with the appropriate details of your MySQL master.

How to set up Percona XtraDB Cluster on Ubuntu

By neerav.mehta Mon, 09/15/2014 - 01:36 4 Comments

Using Percona XtraDB Cluser with at least 3 nodes is a good option when you want to use MySQL in a high-availability mode. The advantage is that even if one of the nodes goes down, the application will still be able to read and write to the MySQL database. In this article, we'll show you the steps to install Percona XtraDB Cluster 5.6 on Ubuntu 12.04. Here are the steps:

1) Percona packages are signed with a key. First we need to add the key to apt. Execute the following command on all the three servers.

How to connect to GlusterFS from a client machine

By neerav.mehta Sat, 09/13/2014 - 07:48 Comments

This article is for those users who already have GlusterFS server installed. In the article, we demonstrate how to connect to GlusterFS server from a client.The example shown in the article first installs GlusterFS native client 3.5.2 on Ubuntu 12.04. After this, a series of command line prompts are executed to connect to the GlusterFS server from a client. Add GlusterFS PPA and install its client library. A directory will also be created on the client machine from where GlusterFS will be mounted.Don't forget to replace parameter names with local ones While using the code provided in the article.

How to change location where MySQL stores data on disk

By neerav.mehta Fri, 09/12/2014 - 19:27 Comments

Most developers who install MySQL via apt-get on Ubuntu will know that it comes with pre-defined settings. The directory where MySQL stores its data is one such setting. The default location is /var/lib/mysql. There are times when this location will have to be changed. But a lot of developers face difficulty in this regard. This article will guide you through the process. Use the command line prompts provided in the article to arrive at desired results. After you have completed the steps mentioned in this article, make sure you restart MySQL. And voila, MySQL will use the new directory specified by you to store data.

How to cache pages by role in Varnish

By neerav.mehta Fri, 09/05/2014 - 18:59 5 Comments

Varnish is generally used to cache pages for anonymous users. It is also used to cache pages by role. At Red Crackle, we deploy Varnish to cache pages by role for corporate sites that are exclusively visible only under SSO. This ensures all users are authenticated but there is no user related information present on most of these pages. This article explains how Varnish caches pages and how configuration can be altered to cache pages by role. The article uses hook_init() to set a cookie that identifies user roles. hook_user_logout() is then used to remove the cookie as soon as the user logs out.

Ready to get Started?