Tag Archives: DNS

Cloudflare

I had dabbled with CDN before (LiteSpeed, Jetpack), but a recent requirement around my NAS required me to move my DNS service to Cloudflare. So I thought, why not use their CDN, too and compare the before and after performances?

For web traffic, you can use Cloudflare in two modes

  1. DNS only
  2. DNS plus Proxy

As the names say, the first option uses Cloudflare servers as your authoritative name servers, but your traffic goes straight to your original server. There’s no caching and there’s no CDN.

Turning on the proxy is where the real benefits are supposed to be visible. I used their free plan for testing.

As you can see, I used various tools to test the difference in performance.

Network Latency

Being a network engineer, the first thing I tested was network latency difference between my web server and Cloudflare’s proxy.

I tested from Thailand, and as expected, Cloudflare’s proxy has significantly lower latency compared to my web server, which is based in the US. The benefits may be lower if tested from the US itself.

Pings to domain resolving to web serverPings to domain resolving to Cloudflare’s proxy
Web Server vs Cloudflare proxy Proxy Ping Results

Average 224ms latency vs 36ms.

This means that my users can experience better Round Trip Times to my website globally by connecting to their nearest CDN, instead of all focusing on one server in the US.

But ping is only part of the story. For real-life results, I used the below tools.

I ran all the tests raw with Cloudflare paused and WordPress plugin disabled. Then I re-ran the tests again, one day after enabling both.

Google PageSpeed Insights

Google PageSpeed Insights is an important tool, especially because Google uses this score as a metric to calculate its search engine Page Rankings. It is a bit simplistic, as in it doesn’t let you select a source server. But it does show results for both mobile and desktop.

Google PageSpeed Insights Mobile RawGoogle PageSpeed Insights Mobile Cloudflare
Google Pagespeed Insights Mobile, Raw vs Cloudflare
Google PageSpeed Insights Desktop RawGoogle PageSpeed Insights Desktop Cloudflare
Google Pagespeed Insights Desktop, Raw vs Cloudflare
Google PageSpeed Insights Desktop RawGoogle PageSpeed Insights Desktop Cloudflare

As you can see, there’s a minimal performance gain, which makes sense because Google’s servers are likely in the US, similar to mine.

DebugBear

DebugBear is similar to Google, but also shows a helpful graph of the different activities happening during your page load. Again, only US is available as a location for free.

DebugBear Mobile RawDebugBear Mobile Cloudflare
DebugBear Mobile, Raw vs Cloudflare
DebugBear Desktop RawDebugBear Desktop Cloudflare
DebugBear Desktop, Raw vs Cloudflare
DebugBear Mobile RawDebugBear Mobile Cloudflare
DebugBear Desktop RawDebugBear Desktop Cloudflare

As you can see, there’s an insignificant decrease in the load score for mobile, although desktop being perfect to begin with couldn’t be improved on.

Solarwinds Pingdom

Pingdom has an advantage over the last 2 tools in that it allows you to select a server location to test from. I chose Australia, being far from USA.

Pingdom rawPingdom Cloudflare
Solarwinds Pingdom, Raw vs Cloudflare
Pingdom rawPingdom Cloudflare

As you can see, there’s an insignificant amount of decrease in Pingdom’s score, but the load time and the number of requests are down significantly.

Wattspeed

Wattspeed’s lighthouse tool allows you to test for Desktop and Mobile separately, but doesn’t let you select a source server.

Wattspeed Lighthouse Mobile RawWattspeed Lighthouse Mobile Cloudflare
Wattspeed Lighthouse Mobile, Raw vs Cloudflare
Wattspeed lighthouse desktop RawWattspeed Lighthouse Desktop Cloudflare
Wattspeed Lighthouse Desktop, Raw vs Cloudflare

Significant increase in scores for both Desktop and Mobile.

Overall Verdict

Test ToolRaw ResultsCloudflare Results
Google PageSpeed (M)80/10084/100
Google PageSpeed (D)99/10099/100
DebugBear (M)71/10091/100
DebugBear (D)100/100100/100
Pingdom75/10074/100
Wattspeed (M)82/10099/100
Wattspeed (D)76/10084/100

The verdict is clear, in most cases, Cloudflare provides significant and measure-able improvements in page load times. Considering that the service is absolutely free, it is a no-brainer to use it.

However, performance benefits are not the only advantages

  1. Cloudflare will stop DDoS attacks on your website.
  2. Cloudflare allows you to set up firewall rules to block certain traffic to your website (eg on the basis of geolocation).
  3. Even if your website ever goes down, Cloudflare can continue exposing your website from its cache.

My Septoplasty/Turbinoplasty experience

Septoplasty: http://en.wikipedia.org/wiki/Septoplasty
First, a little history:-
I have always been prone to catching a cold/having my nose blocked since a very early age. Every 2-3 months I would catch cold and be dependent on Otrivin for weeks. This trend continued well into adulthood. At one point of time, I was so dependant on Otrivin that I had to be weaned off it over a week, by inhaling steam 6-8 times a day. It was like drug withdrawal, but in the end, I was off Otrivin. However, I would still continue to get colds and resort to taking steam many times a day.
On some days, even without a cold, I would wake up with a stuffy/heavy face, a splitting headache which would simply not go away and generally keep me in a miserable state for a few days. An MRI due to some other reason revealed a polyp in my Sinus and revealed that I had chronic sinusitis and that my Sinuses were swollen all the time.
I consulted an ENT at the same hospital where I got my MRI and he recommended surgery to take out the polyp. I was not convinced, so I went to another ENT (Dr. K.K. Handa, Director of ENT and Head Neck surgery, Medanta Medicity, Gurgaon). He revealed that my Septum was also deviated (It basically means that the wall separating my nostrils is crooked) and it could be managed using medication. He asked me to use Nasonex and inhale steam for comfort. I had a few things going on professionally and personally so I put surgery out of my mind and continued to use Nasonex and inhale Steam whenever necessary.
This was almost a year ago. Since then, I have had sinus infections almost every month (sometimes more than once a month), had to see an Eye doctor because I felt pressure behind my eyes and be dependant on Steam inhalation to be able to breathe for a reasonable period of time. Finally, on Jan 15, 2013, I re-visited Dr. Handa and informed him that I had been having a miserable time and needed another way out. He immediately asked me to get a CT scan, after which we would explore other options. I got  CT scan the very next day, saw the Doctor the day after that when he informed me that my Septum is especially crooked. This is preventing proper draining of Mucous from my Sinuses, leading to recurrent infections and also breathing problems. He asked me when I can come in for Surgery. I said I will be fine with a surgery on the morning of  Friday, Jan 18, 2013. He asked me to speak with his assistant to sort out all the details.
I spent the rest of the day sorting out Insurance details, filling out paperwork, getting blood tests and an Anesthesia suitability test etc. I was admitted the next day, Thursday, Jan 17, 2013. I was told not to eat or drink anything after midnight, given an anxiety medicine and went off to sleep.

Deviated Septum
Image Courtesy: http://drug.com

Image Courtesy: http://drug.com
Day 1 – Surgery

I was woken up at 6:00 AM by the nurse who sad I will soon be wheeled into a pre-op room. I was kept there with other surgical candidates for about an hour after which I was wheeled into the Surgery room. There were 2 huge lights on top of me. The doctors attached an IV line on my left hand (Ouch! That hurt) and asked me to relax. Then they placed a mask on my face and asked me to take deep breaths. The gas coming out of it smelled funny. After 2 deep breaths, I was out.
When I woke up, I was in a post-surgical recovery room, feeling awful. I noticed that I had a throat-ache, I was very thirsty and had something stuffed into my nostrils and something taped over my nose. I couldn’t speak as my mouth was dry and my throat ached but I somehow signalled that I wanted water. They told me  that I couldn’t drink water for a few hours yet, but gave me a small dropper with a pitiful amount of water in it to wet my lips. I gobbled it all down my throat and was told I won’t get any more for a few more hours (Apparently water while still under the effects of Anesthesia makes you puke). I was wheeled into my room, where I was propped up just a little and allowed to rest. I was miserable. I was thirsty, my head felt like full of lead and having to breathe through my mouth caused my throat to ache more and my mouth to dry up. I asked what time it was, apparently, it was 14:00. I tried to sleep, but just couldn’t. I was finally given some water at 16:30 after which I sat up. I found out that sitting up made me feel much better than lying down; however, it also caused my nose to bleed and turn the bandage around it, red. I had a couple of fruit juices, met a few visitors (I don’t remember these incidents very clearly anymore). I had a hearty meal at night and then tried to sleep.
This was the worst night ever. I couldn’t sleep no matter what. My throat would dry up and start hurting every 10 minutes after which I would have to drink something. My nose would bleed and blood would start dripping off into the bed (I was later told this was not fresh blood, but crusts of dried up blood being dissolved by mucous and normal sinus discharge).
Day 2 – Discharge
I had maybe 20 minutes of sleep the entire night and was actually grateful when the Nurse came and switched on the lights. I had a hearty breakfast and looked forward to my discharge. My surgeon along with a few other doctors came to see me. I told them about my lack of sleep and he prescribed me an anxiety tablet for the following night, to be taken only once. A doctor in his team changed my external-dressing (which was by now soaking wet and dripping bloody liquid) and told me I could go home in a few hours. I had a hearty lunch in the discharge room and then went home. I tried to sleep but didn’t manage more than 20 minutes of sleep. I changed my dressing myself a few timesas even this one was wet and dripping. At night I had a nice early dinner and went off to sleep. I actually manage to sleep 4-5 hours this time, even though I was breathing out of my mouth.
Day 3 – Off with the packing

I woke up early, had breakfast and got ready to go to the Hospital to get my nostril packing removed. I looked forward to being able to breathe out of my nose again. After waiting in the emergency room (It was Sunday and the OPDs were closed), a doctor came to see me. He made me lie down on a bed in the emergency room (The room was very depressing; people crying and wailing) and poured a few drops of Otrivin down my nostrils. He then used a forcep to pull and remove the packing from my left nostril. It was moderately painful and super awkward. The packing was easily 6 inches long and it felt strange being pulled out of my nose. As soon as the packing was gone, I felt blood/liquid pour down the back of my throat, followed by a gush of fresh air through my nostril.
He then used the forceps to remove the packing from my right nostril. This one was apparently stuck pretty bad and felt horrible. He had to tug pretty hard and it felt like someone was tugging at my brain. Tears poured out of my eyes. Even then, the packing didn’t come out all at once and he had to pull out multiple pieces. At one point, I blacked out for a few seconds, because of the pain. This was the most painful moment of the entire procedure, followed by the most blissful moment. Both my nostrils were open and I was breathing in great gushes of air like I had never done before. I never remembered so much air in my right nostril ever. I was still in pain, so the doctor gave me a painkiller shot and let me go home. I went home, lay down and slept blissfully for 2-3 hours. This was my first blissful sleep since the surgery.
I woke up after a few hours and took my first shower in days. It felt amazing and removed the heavy feeling in my face and head. I was still very tired and couldn’t stay up for reasonable amounts of time without feeling dizzy and going back to bed. I met a few visitors in the evening, had an early dinner and went to sleep. Breathability was 100%
Day 4 – Cleaning
I slept for 13-14 hours with minimal interruptions and woke up the next day feeling much better and fresher. I had crusts of blood inside my nostrils, which I washed out using Solspre (Saline spray, which comes in a bottle). Breathing was down to 80%.  I spent the day reading and watching Sitcoms on my computer. I had an appointment in the evening with the doctor to get some endoscopic cleaning done.
My friend came in the evening and took me to the doctor. After waiting for sometime, he asked me to come in. I told him that I was feeling much better. He used a suction device to suck blood clots out of my nose. This was also very painful, but much less than when they took out the packing. Breathing was back up to 90%. Another night of good sleep.
Days 5-6

I can feel my Nasal passages closing up slowly. By the end of day 6, I have around 50% breathability in my left nostril and 30% in my right. There’s thick discharge all throughout the day, though blood is less frequent now. I can sometimes taste blood in my throat, which I guess is still from the blood clots getting dislodged.
I blew my nose particularly hard tonight and a lot of blood clots came out. Breathing is better, though I feel that something has dislodged in my left nostril and it feels kind of raw.
Thankfully, this congestion is expected, up to a month after the surgery and is not something out of the ordinary. The discharge eases up when I lie down, so at least I am still sleeping.
Day 7
Last night, the right nostril was completely blocked, whereas the left one was at 60-70%. After I woke up though, right one opened up quite a bit and stayed at 40-50%.