Nitropack review

Those of you who are running some sort of a content management system (CMS) for your websites would be familiar with the problem of improving the site loading speed through different methods. From the age old caching methods of using op cache module, to using an application specific caching method such as WP-Supercache for your WordPress installations, the sheer variety of solutions out there is a lot.

For a non-tech webmaster (these days, this term seems like a conundrum!), it becomes difficult to choose. At the end of the day, what one ends up going for is how fast the website is loading and more importantly how is the web performance of the site.

Let’s take a look at what are some of the common factors that any webmaster would like at for their caching solution.

Server site rendering time

This is effectively how fast is your server giving the response on the browser. Let’s say that you are running a blog on a small instance or a shared hosting solution. This would usually have limited resources associated with it, be it computing or memory. For instance, currently, these pages are being served off a 512 MB droplet.

Needless to say as your traffic increases, these limited resources are then not enough to address the entire traffic and thus, the response time for all your visitors starts to increase. A simple solution for these problems could be to bump up the hardware and increase the computing and memory being made available for the server. The computing speed is obvious, but why the memory you might ask? Well, since most web servers are softwares running on servers (for e.g Apache or Nginx are the servers most commonly used for WordPress), these software processes have to run on the server. The more the traffic, the more the number of processes.

If you are running WordPress and are facing a load of traffic, and if you are running your database on the same server, then you might sometimes be seeing images like the one below –

MySQL error with WordPress

Seems familiar? A common reason for this is when there are too many apache2 processes and not enough memory to handle all of them. The server promptly terminates the other processes, including the MySQL daemon.

Caching to the rescue

This is where server side caching comes to the rescue. Take this blog post for instance. How many times in the week am I going to edit this? Not many right?

In which case, instead of the PHP script executing every time, why can I not serve the static (HTML pre-rendered) version of this post?

WP-Supercache does a good job as a plugin to do this, however, in this case, for supercache to execute, the WordPress PHP scripts are still executing. How can we stop those?

Another option would be to run caching at Apache or Nginx’s level. This is a much better approach since instead of calling PHP scripts, the server will serve the last known cached static file. The problem with this approach is cache management and storage.

With a small server, you may not have a lot of storage, and if you have been maintaining a content heavy site, then caching all pages might be a storage intensive process. The expectation from your instance’s compute power also increases.

This is where you will find reverse proxy servers shining.

Reverse proxy servers

A reverse proxy server is a server that sits in front of the web servers and forwards client requests. One of the older versions for PHP based websites was Varnish. Nginx also offers this, and newer versions of Apache also do offer this functionality.

What the reverse proxy does is for each request, it caches the response from the down stream server and serves that response for each subsequent request. Think of it as a smart cache manager that sites seamlessly between your CMS and the user.

Traditionally, these were a bit difficult to setup, and therefore were the domain of only the tech oriented webmasters. However, of late, there have been a couple of smart SasS based reverse proxies, and that’s what I wanted to write about.

Cloud-based reverse proxies

A cloud based reverse proxy is a reverse proxy server that’s not on your network/server infrastructure, but rather hosted as a separate service that you choose to buy.

I had initially tried Cloudflare, but wasn’t really impressed with the results. There were a couple of Indian service providers as well, but the outcome wasn’t that great.

Then, one of my colleagues pointed me to Nitropack. Getting started with Nitropack was a breeze and I could easily set this up. There was also a plugin to be installed in my WordPress setup and that’s about it. Nitropack even had a CloudFlare integration (since I manage my DNS on CloudFlare), where it made the relevent DNS entries and I was able to use this without too much of a hassle.

I am currently on the free plan, but the immediate impact on my server response times, and my web performance has been substantial.

If you are a website owner and if you have been harangued with web performance issues, do give this solution a try. It makes a sufficient impact on your response times.

Gold

Gold

I am in the middle of reading Shashi Tharoor’s An Era of Darkness: The British Empire in India. If you have been living under a rock like I was, then you may not have heard about his Oxford debate where he smashed his contemporaries on why Britain should do reparations to India.

At this time, I chanced on the movie Gold in Amazon Prime. What perfect timing! A movie about India’s first Olympic gold medal – as a free country. The movie stars Akshay Kumar as a sports manager of the British India National Hockey team, and their ability to keep winning the Olympic gold for British India. History buffs and hockey buffs (preferably both) would be quick to point out that during that time the team was led by the Wizard of Hockey, Dhyan Chand.

For the sake of preserving identities of the negative roles, the names have been changed, and Dhyan Chand is portrayed by Kunal Kapoor as the legendary captain Pritam. If you do not know who is Dhyan Chand, please stop reading and head on to the wiki link. India was well known in the history of hockey largely due to this chap. We owned the international circuit from 1928 (pre-independence) up till as late as 1980. Pretty much the time cricket took over as the national craze and the national sport lost its crowds. Ironically, in 2014 when Dhyan Chand’s name was being considered for Bharat Ratna (the highest civilian award in India), it was never nominated and the award winner was none other than apna Sachin!

But I digress, this is about the movie and not a diatribe about hockey losing out to cricket!

The movie is about getting India’s first Olympic gold, and how the main character in the story (a Bengali team manager played by Akshay Kumar) helps the team get its gold. This under the backdrop of the partition and post-independence struggles that the new country faces make for a riveting story.

Bollywood has oft taken an anti-Pakistan stance in the past, and it’s very easy to take this stance. However, you should see how this movie has spun the entire India-Pakistan tale. It’s heart-rending and one might wonder … a magnificent what-if … our national leaders back then were brave and foolhardy to take such a decision then. What stops from doing something equally foolish now?

History tells us the outcome of this story … India dominated the hockey scene for a long time. However, the story also talks about the role of administration in ensuring that the sport has enough backing. In the chaos of IPL and slogans like fan banna padega … I ask you this … what about our national sport? I wish this movie had done much better on the box office, it deserves to be seen, not only for the acting – but also for the narrative.

Do Androids Dream of Electric Sheep?

As a child, I had seen Blade Runner … in fact that was when I first came across the phrase Android. Yes, back then android did not mean an operating system for a smart phone.

The title of this blog post is a book by Phillip Dick, this book was adapted as the story behind Blade Runner. The movie on its own was also a fantastic experience, but if you read the book, and then watched the movie, its even better.

Continue reading “Do Androids Dream of Electric Sheep?”

Constantinopolis

My interest in Historical titles was piqued by books such as Alexander, Mahabharata, Ramayana and Camelot. However, when I saw Constantinopolis by James D. Shipman, I knew I had to read through this book.

Settled between Europe and Turkey, Istanbul (the erstwhile Constantinople) is right between the crusaders of Europe and the Ottoman army. The tale of Constantinople and its eventual fall at the hands of the Ottoman empire makes for an interesting story.

The Prelude to Constantinopolis

The author does a good job of explaining the history behind the fall of Constantinople. The reason behind Mehmet’s (the then Ottoman emperor) hunger for taking on Constantinople. The reason behind why the Vatican sent such a meagre force to help out the besieged city. The explanation of King Constantinople and the daily frustrations he faced in holding the Ottoman empire at bay.

The Siege

People know of the Trojan War because of the horse, the malware and the movie. However, this tale bellies the same upheavals (if not more), the entire siege had both the sides teetering on the brink of destruction and coming back up to save the day to fight again.king

Sieges take time and well defended cities take months to fall. Likewise even this city which had some of the most formidable defenses took 6 months to finally fall in the hands of the Ottoman Turks. It’s not as if the Ottoman war machine was running in perfect synchronization.

They had their own set of problems, and the politicking within the large empire was subtle and this victory ensured that Mehmet become the all powerful emperor that he was destined to be, surpassing the feats of his father who was loved (and feared) by all his people.

Not just a Story, but History

All in all, the book is not just a tale, but also tells us the truth behind the events that led to the great city’s fall, and the subsequent rise in the Ottoman empire’s impact on Eurasian trade. If you love historical tales, do not forget to pick up this book!

The Mahabharata Quest: The Alexander Secret

Last month, I read 6 books – thanks to the Kindle Unlimited library I had subscribed to. Ample food for thought for some book reviews. I would have loved to go through some classic sci-fi books, however, I chanced upon some historical and mythology books, one of them being The Mahabharata Quest.

Since I had already read through a series of books on Alexander, and was thoroughly piqued to see how Mahabharata is related to Alexander.

Turns out, it wasn’t! Read on to know more :)

The Mahabharata Quest

The Mahabharata Quest is a previous hit book by the same author, and it involves the same characters in another sequel.

The great thing about this book is how the author has interwoven the past and the present into one coherent novel. The book is about Alexander’s declaration of being a god (son of Zeus-AmmonRa), and how his prowess in battle could be attributed by scientific reasons.

I will not divulge into much details here, suffice to say that I started reading this book to see how Alexander is related to Mahabharata. Turns out the plot characters were connecting the two books. The good part about the book is that the author has done an excellent job of keeping a fast narrative and has the readers interested through the book till the end.

Yes, there are parts where the scenes seem to Bollywood like, but that’s entertainment for you. No, I am not a grammar nazi and I won’t complain about the bad English. If I can read C’Bag, then I might as well pay homage to the rest of the Indian authors.

Give this book a read, you might just enjoy it! Please keep in mind to not nitpick about mythology and history being intermingled like this, the narrative style is fast and something that I thoroughly enjoyed.

The Hobbit: The Battle of the Five Armies

For the past couple of years I was waiting to see how Peter Jackson treated The Hobbit. His Lord of the Rings trilogy was a treat to watch, and although many plots of the book were left out, the trilogy remains one of my favorite.

The Hobbit on the other hand is much smaller, and uses the lore already built around Middle Earth. This was why, watching the movie was an entirely new experience for me. Take the Game of Thrones series, where the episodes match verbatim scenes in the books … the Hobbit’s treatment adds an interesting angle to the way Peter Jackson has unfolded the story for all of us.

Warning: If you have not watched the movie yet, stop reading, this is a SPOILER alert. I generally do not reveal plots, however I make an exception in this case … there are multiple aspects within the movie which I wanted to rant and rave about :-)

Continue reading “The Hobbit: The Battle of the Five Armies”