Odin SQL

Programming, software and technology

  • Blog
  • About
  • Contact
You are here: Home / Archives for Benjamin Knigge

Feeling defrauded by Linode

January 21, 2015 by Benjamin Knigge Leave a Comment

Linode.com

Linode.com Logo

Late last year a client that I work with decided that they would like to have Moodle set up on a VPS and they selected Linode to host it.

After they set up billing they provided me with access to their VPS and I went through the process of setting up Moodle on their VPS.

Around this same time I was thinking about starting a blog related to software, programming, hosting and technology which became this very blog that you’re currently reading.

I was fairly impressed with Linode so I decided to use them as the host of my own VPS. I figured that I would do my client a favor and use their referral link since it was them giving me access to their server which is what led to me selecting Linode to host my own VPS.

A couple of months have passed and during that time I’ve written a few posts regarding or relating to Linode’s services. When I write about something that relates to Linode I link to them using my referral link. I use and like their service and if sending other people in their direction leads to me getting a couple of months of free hosting all the better. These links in turn have led to a non trivial amount of traffic being sent to their site.

It’s been a while and I decided to take a look at my referral stats with Linode and to my surprise there’s a big fat zero in my referrals. That seems rather odd given the amount of traffic that I’ve been sending to them so I decided to look into if there was something wrong. I contacted their support department who then put me in contact with their marketing department. Their marketing department informed me that my account has been marked as fraudulent. The reason being, that I used a link from my clients account which I had access to when I opened my own account.  Marketing recommended that I try to clear this up with their support department.

I opened a support ticket and a few hours later they insisted that I had opened multiple accounts in an attempt to defraud them. This isn’t true, but they don’t seem to care all that much, and it’s easier for them to tell me to take a hike than to fix this mess. I’ve been informed that I’ve been blacklisted from their referral program for this “fraud” that I’ve never committed.

Apparently theirs nothing within the support departments power that can undo this once that a decision has been made.

If Linode’s support department doesn’t care maybe someone else in the company will.

I thought I would try to get someone at Linode to pay attention via a blog post.

If they’re not willing to correct this, I’ll send the couple of hundred users a month that I’ve been sending them to this page instead.

I’m in Europe and it’s late so I’m off to bed.

Hopefully in the morning I’ll have so kind of positive reply from them.

It’s frustrating that I’ve had to take things this far.

Update

I woke up this morning with an email from the VP of their support department in my inbox.  He informed me that my account is no longer marked as having taken part in “referral fraud” He apologized and said that he would follow up with me today regarding any referrals that I’ve made in the past month (if there are any) being credited. It’s the middle of the night on the east coast of the USA so we’ll see what happens in a few hours.

 Update 2

In the end the VP of support gave me a $50 credit and apologized for handling the situation poorly which is more than what I was asked for. I would have been happy if they stopped saying I had committed fraud and told me what was going on with their referral program. The support VP told me that he was unable to find any referrals from my account, which is kind of hard to believe based on the traffic, but it is what it is. If they’re referral program is doing such a poor job of converting interested users into paying customers then they really need to address that. For comparison 2.5% of the traffic I send to DigitalOcean sign up and 9.8% of the traffic I send to Vultr. Linode costs a little bit more than either of them but it’s also more consistent and reliable with faster IO and a better network.

Update 3

A couple of months have gone by and despite sending Linode a fair amount of traffic I still haven’t seen a single referral. I’ve asked them several times to resolve what ever issue they’re having. Either Linode is incredibly bad at converting potential customers into paying clients or their referral system doesn’t work properly. Either way I’m through putting in any effort at steering potential clients their way and I plan on moving my own site over to RamNode once my existing credit with Linode is used up.

Let me know in the comments if you’ve had a similar negative experience with Linode.

 

 

Filed Under: Hosting, Meta Tagged With: Hosting, Linode

DIY VPS Netflix proxy

January 20, 2015 by Benjamin Knigge 7 Comments

Netflix logo

Netflix logo

I’m an American currently living in Moldova. Unfortunately this means that Netflix (along with many other sites) isn’t available to me here. So being the tech savvy guy that I am I thought that I would build my own.

I could have gone the easy route and set up a VPN but that would slow down all of my internet traffic. I waned to build something that would only proxy the traffic for the geographically restricted services.

After much searching I found this config generator for Haproxy on github and managed to get haproxy configured on Ubuntu 14.04 along with bind which I’m using for DNS as opposed to dnsmasq which is outlined on the github project. I used the SNA only mode for the config generator.  I had a bit of credit that is about to expire from a $20 Vultr coupon so I used Vultr to host the VPS. I would recommend using something even cheaper. a $15 a year ultra low end VPS with RamNode  would suffice. (edit  : I tried setting this up on a Ramnode OpenVZ based VPS and it won’t work on a VPS using OpenVZ without editing OpenVZ settings on the host. Most VPS hosts won’t do that so avoid a VPS using OpenVZ) If I didn’t have the Vultr credit it’s what I would have used and after my existing credit runs out on Vultr I will probably move this over to RamNode myself. So far everything is working great on my laptop.

 

I’ve spend way too much time over the past couple of days trying to duplicate this same functionality using Nginx. I was attempting to use a TCP proxy to pass the SSL encrypted traffic directly to the end user. This would prevent the need for an SSL cert on the proxy server.  I found and was working with this Nginx TCP proxy module but I ran into an obstacles that I don’t think I can overcome at the moment. Nginx doesn’t currently support passing the SNA host via proxy_pass. SNA proxy sport is in the development branch of 1.7.  My plan was to simply forward all traffic on ports 80 and 443 to the host in the request headers.

I had planned on doing a DIY tutorial on getting this up and running with Nginx but for the moment at least, it doesn’t look like that’s going to happen.

If you need any help getting the Haproxy method working feel free to leave a comment. If I have the time and their is enough interest I could do a post on that.

Once the 1.7 branch is stable I might take another look at this but for now I’ll still with the haproxy method.

A far less expensive and even simpler solution would have been to just spend a couple of dollar for the proxy/vpn service at SmartDNSProxy.com. I’ve set it up for a couple of acquaintances that I’ve met over here and it’s working great for them. It’s what I would recommend for anyone that doesn’t want to spend the time learning how to configure Haproxy.

 

Filed Under: Uncategorized Tagged With: RamNode, Vultr

Linode vs. Vultr – two leading VPS hosts compared.

January 16, 2015 by Benjamin Knigge Leave a Comment

Vultr vs. Linode

Linode Vs. Vultr a comparison of two leading low cost VPS hosting providers

While looking through my Google Webmaster Tools search engine referrals I see that there are several people making their way to my site looking for a comparison of “Linode vs. Vultr”. I thought I would oblige and do a direct comparison between these two virtual private server (VPS) hosting services. So without wasting any more time here’s  my comparison of Linode and Vultr.

Linode

Linode.com

 

Linode has been around for several years and have recently done multiple upgrades to their network. They have a good reputation and are marketing themselves to experienced developers and corporations looking or lower cost “cloud” providers than alternative such as Amazon EC2.

Pros

Low cost

The $10 1GB 1 cpu plan maybe be twice the price as the lowest plan on at Vultr and $3 more expensive that a VPS with 1GB of ram on Vultr. They may not be the least expensive but at $10 it’s still a great value.

Scale Up or Down

Linode offers the ability to scale an individual “node” (Linodes name of a VPS) both up and down as needed. If you’re expecting a holiday rush in November and December you could scale you’re node up at the end of October and then back down at the beginning of January.

5GB Network

Linode offers the fastest network of any lower cost VPS provider. Each server is connected with to a 5GB network and each data center has a 20GB network connection

Fast SSD

The SSD that Linode is using are faster and more consistent that the SSD used by Vultr.

Multiple Data centers

Linode offers data centers in London UK, Tokyo Japan , Newark New Jersey, Atlanta Georgia, Dallas Texas and Fremont California

Load Balancers

Linode offers load balancers.

Server Stats

LongView is the name of Linodes server stats package that you can use to monitor utilization. The free version displays information for the past 12 hours. It very useful in determining if you should upgrade your node or diagnosing any issues that may arise.

Support

The support department seems to be pretty well trained and easily accessible. I’ve had a few questions and they were answered quickly.

Managed Hosting

Managed hosting and hourly system administration are available. A managed VPS is going to cost you $100 per month more than the same package that is self managed.

Cons

Low speed CPU
By no means are they slow but they’re significantly slower than some of their competitors offerings. However the performance is  more consistent.

 

Higher minimum cost

There’s not $5 option the lowest price VPS is $10 on Linode. A similarly configured server with Vultr would cost you $7.

Linode Benchmarks

$10 1GB RAM 1CPU

UnixBench score: 520.1

I/O rate: 693.0 MB/second

Bandwidth rate: 44.1 MB/second

View the full ServerBear Benchmarks for this server.

Vultr

Vultr logo

Vultr is relatively new to the VPS market although their parent company Choopa.com has been in he business of leasing dedicated servers around for over a decade and has a relatively good reputation. I haven’t personally deployed anything with them yet although I plan to in the near future.  Their benchmarks are very impressive and they have a few unique features that some people may find advantageous.

Pros

Low cost

The $5 VPS with 768MB of RAM is one of the best deals you’re likely to find for VPS with SSD. Linode’s lowest cost server is $10 for 1GB RAM.

Multiple Data centers

At the time of writing Vultr has a total of 14 different data centers around the world.  They have data centers in each of the following cities: Chicago Illinois, New Jersey, Dallas Texas, Atlanta Georgia, Miami Florida, Silicon Valley California, Los Angeles California,  Seattle Washington, Sydney Australia, Tokyo Japan, Amsterdam Netherlands, Frankfurt Germany, London UK, and Paris France

Support for Windows Servers

They offer support of Windows VPSs at an additional cost or if you have your own license you can create your own disk image and upload it.

Performance

The CPU performance of the Vultr VPS are Great as you will see when you get to the benchmarks.

Cons

Network

The data connection can be slow at times.

Disk IO

Disk IO performance can be inconsistent fast one moment and very slow the next.

 

Vultr Benchmarks

For the benchmarks I used the benchmark script provided by ServerBear.com

I had a credit on my account that was about to expire so I decided to test the $15 a month plan and $70 a month plans as well. I also ran the same benchmarks on Vultr servers located in Sydney Australia. The results were similar with the exception of the bandwidth rate being much lower.

 

Vultr 1GB RAM 1 CPU $7 plan

UnixBench score: 2250.4

I/O rate: 447.0 MB/second

Bandwidth rate: 31.3 MB/second

View the full ServerBear Benchmarks for this server.

Vurtr 2GB RAM 2CPU $15 plan

UnixBench score: 2723.4

I/O rate: 378.0 MB/second

Bandwidth rate: 91.6 MB/second

View the full ServerBear Benchmarks for this server.

 

Vultr 8GB RAM 4CUP $70 plan

UnixBench score: 2707.7

I/O rate: 288.0 MB/second

Bandwidth rate: 81.3 MB/second

View the full ServerBear Benchmark for this server

Conclusions

If you were paying attention you would notice that the $15 plan at Vultr actually outperformed the $70 plan. This highlights the difficulty in benchmarking a VPS depending on how the host server has been configured to allocate resources a server could perform great one moment and horribly the next.  Vultr has faster CPUs but slower SSD and a slower network. It’s easier for the VM on the server to find 1 free CPU than it is to find 4 underutilized CPUs.

Recomendations

With the extra CPU power and the ability to host a Windows VPS Vultr’s great.  Despite having faster CPUs the majority of websites would actually perform better on Linode due to the faster network and faster SSD.  I’m hosting this site on a $10 Linode VPS but as soon as my existing credit is used up I plan on moving it over to Vultr.

Sign up for Linode

use the coupon code “LINODE10” (without the quotes) for $10 credit

Sign up for Vultr

use coupon code “SSDVPS” (without the quotes) for $20 in free credit but it must be used within 30 days

If you decide to sign up with either Linode or Vultr and have some questions regarding configuration, security or software recommendations feel free to contact me by either leaving a comment on this page or using the link to the contact form at the top of the page.
After reading through all of this you’ve decided that you would rather leave the management of you server in the hands of professionals have a look at

CloudWays Managed VPS

CloudWays offers VPS management on top of DigitalOcean’s network

That’s it for Linode vs. Vultr. I  hope that you’ve found the information in this post helpful.  If you’ve noticed a mistake, have a comment, suggestion, would like a custom recommendation let me know in the comments.  If you would like to keep updated periodically regarding new content please join my mailing list by filling out the form in the right side navigation.  Thank you for reading.

 

Filed Under: Hosting Tagged With: Hosting, Linode, VPS, Vultr

A comparison of WordPress caching options

January 13, 2015 by Benjamin Knigge 2 Comments

Wordpress logo

WordPress logo

 

I’ve spent the past couple of days bringing my site up and down while comparing the many caching options available to WordPress. This is the synopsis of my research. Hopefully this information can help someone else make a more informed decision about the many caching options available.

If you want to implement any of these you’re going to need to be hosting WordPress on your own VPS unless your hosting company is willing to implement caching for you.

The server that this was tested on is a $10 1 CPU Linode VPS with SSD.  The memory and CPU constraints of a low-cost VPS guided my decision-making process. If I had more RAM available I probably would have used memcached more despite the fact that the performance I’m able to get out of an SSD is great.  The initial installation of Nginx was done using EasyEngine which greatly simplifies the configuration required for WP Super Cache or W3 Total Cache. I’ve outlined getting WordPress up and running using EasyEngine here. I’m not going  into details in how to configure each one of these options I just wanted to outline some the pros and cons of the options that I have implemented.

What is Caching?

If you’re reading this you already know. When a request is made for certain content the response from your web server can be stored for a predetermined amount of time either on disk or in memory.  That storage is referred to as a cache.

Why cache?

Your website will serve dynamically generated pages much more quickly while putting your server under far less load.

Which caching options were compared?

  • WP Super Cache
  • W3 Total Cache
  • WP-FFPC
  • Pagespeed for Nginx
  • Nginx Proxy Cache

WP Super Cache

WP Super Cache is probably the most popular caching plugin for wordpress. I used EasyEngine which generates the the necessary nginx config and stores it at /etc/nginx/common/wpsc.conf I was able to server 15,000 page requests per minute using it and the response times were good.  Nginx is very good at serving up static content quickly with minimal system requirements. The only negative about it is that the settings revert to the default and need to be reset if you disable the cache and then re-enable it which is fairly annoying.

W3 Total Cache

The second most popular cache plugin for WordPress W3 Total Cache. It has a lot of options that allow caching objects and database queries in memcached but if you’re using it to generate static pages those options aren’t extremely useful. If you have a word press site with several thousand posts it’s possible that those options could speed up access to less frequently visited posts but it’s not the case with my blog so I didn’t see any befit from storing objects in memcached. It performed approximately equivalently to WP Super Cache but I would recommend WP Super Cache over W3 Total Cache because of the simplicity and the fact that W3 Total Cache has an incredibly annoying popup nag screen every time you open the setting page.

WP-FFPC

WP-FFPC is another cache plugin for WordPress that can be configured to cache your PHP pages to memcahed which theoretically should be much faster than disk based caching.  Unfortunately the plugin wasn’t playing well with my system and some pages were being cached as completely blank.  It seems that this is an issue that more than one other person in experiencing and I wasn’t able to find a solution to the problem. I also had some concerns about the limited amount of memory available on my VPS. This could be a good solution if you’re on Apache and have a decent amount of available memory but it wasn’t working on Nginx with PHP-FPM for me.

Pagespeed

The pagespeed module is available fo Nginx and Apache caches and optimized the content being server. On Nginx it actually needs to be compiled as part of the server. It analyses the content of the pages and images being served and can make changes to them such as removing comments and white space, minifying and combining js and css, and optimizing images. This all can theoretically reduce the amount of time that it takes to download and render a page.  Pagespeed actually accesses and optimizes not only the page that you are serving but will access and optimize the content of all the included page resources such as js, css and images and can then store the results in either on disk or in memcached.

I had numerous problems with Pagespeed each “fetch” to an included resource is handled in a separate thread which isn’t ideal for a server with only one CPU. Even after the request is cached requests are handled much more slowly than when compared to the static caching options and in addition I was never able to configure Pagespeed to server more that 1000 page requests per minute reliably. I also had an issue with a cached and optimized image being corrupt. I finally gave up on dealing with pagespeed after configuring an Nginx proxy cache in front of it and then discovering that pagespeed sets the headers so that the resulting content won’t be stored in the cache and there’s no simple way to change this behavior in pagespeed.  A lot of the functionality that’s built into page speed is already handled by other WordPress plugins and using plugins and a a static page cache is a much easier option resulting in better response times.  These are my results of a load test with 1000 page requests per minute with pagespeed enabled. These we the best results I managed to get out of pagespeed with several hours of effort.  1/15th the number of simultaneous page quests and 4X the response time.

Nginx Proxy Cache

A proxy cache sits in front of your actual web server and depending on the data being requested will either serve a cached version of the data or pass the request for the data onto another webserver. A proxy cache can exist on the same physical server or on a separate one and can also work as a load-balancer between multiple servers. In order to get this to work in WordPress it required adding a couple of lines of code to the wp-config.php so that the site would stop trying to redirect back to the secure version of its self. The issue and resolution are discussed here.    Implementing this takes a bit more effort and research than a plugin like WP Super Cache but it also performs a bit better and the configuration can be easily updated adding in load balancing or fail over.

After implementing this I was able to handle 20,000 page requests per minute fairly well. Here are the results of the load test.

 

Conclusion

If you’re looking for a caching option that is the simplest to implement while offering great performance WP Super Cache is an excellent option.

WP 3 total Cache has a lot of options that will be of no use for the vast majority of people using it. It’s also sporting an annoying repetitive nagging popup.

WP-FFPC wasn’t playing well with Nginx for me but if you’re on Apache and have enough available memory it could be a good option for you.

Pagespeed actually made everything slower and dramatically decreased the number of simultaneous users that my site could support. It may work well on a dedicated server with many processors but on a low end VPS it’s literally worse than not implementing any caching at all.

Nginx proxy cache offers better performance than any of the WordPress plugins. You can put it in front of Apache or any website if that’s your preference. Fail-over and load-balancing are also both possible with a proxy cache. If at some point I upgrade my $10 Linode VPS to something with more memory I can even configure Nginx to use memcached instead of disk.

Filed Under: web development Tagged With: nginx, Wordpress

Linode coupon and promo codes

January 10, 2015 by Benjamin Knigge Leave a Comment

 

This page was last updated on April 20th 2015

Linode coupon and promo codes

Linode.com

I’ve been looking over my Google webmaster tools and I’ve been getting a bit of traffic from people looking for Linode coupon codes and promo codes. So I thought that I would give people what they want. I’ll do my best to keep this page updated with the most recent and best coupon codes and promo codes for Linode.

 

Sign up for Linode

use the above big green link with the coupon code “LINODE10” (without the quotes) for $10 in free credit.

I’ve also done several comparisons of Linode with other SSD VPS providers.

Here are the links to those posts.

Linode vs. DigitalOcean

Linode vs. Vultr

A comparison between Linode,  DigitalOcean,Vultr and RamNode

 

I’ll do my best to keep this page updated. If this coupon expires please let me know and if you know of a better coupon code to use please post it in the comments.

 

Filed Under: Hosting Tagged With: Hosting, Linode, VPS

DigitalOcean coupons, discount and promo codes

January 10, 2015 by Benjamin Knigge Leave a Comment

This page was last updated on May 7th 2015

Digital Ocean Coupons

DigitalOcean logo

I’ve been getting a bit of traffic from people looking for Digital Ocean coupon codes and promo codes. More exactly people are looking for “Digital Ocean coupon” and “Digital Ocean promo code”. I thought that I would give people what they want and make this short post. I’ll do my best to keep this page updated with the most recent and best coupon codes and promo codes for Digital Ocean.

 

Sign up for Digital Ocean

If you use the above big green link button  along with the coupon code “ALLSSD10” (without the quotes) You should get $10 in free credit after establishing a payment method.

I should also mention that if managing your own VPS isn’t something you want to do, you can actually get a $5 Digital Ocean VPS managed through cloudways for the same price.  If you went directly through DigitalOcean you would pay just as much but you would have to manage it yourself.

Sign up for a $5 managed VPS with CloudWays

CloudWays has a free 15 day trial so it won’t even cost you anything if you decide it’s not for you.

 

If this Digital Ocean coupon expires please let me know and if you know of a better coupon code to use please post it in the comments. If you know of a better coupon for Digital Ocean I would also like to hear about that so leave me a comment.

I’ve also done several comparisons of Digital Ocean with other SSD VPS providers.

Here are the links to those posts.

Digital Ocean vs. Linode

Digital Ocean vs. Vultr

A comparison between Digital Ocean, Linode, Vultr and RamNode

Filed Under: Hosting Tagged With: DigitalOcean, Hosting, VPS

Vultr coupon, promo and discount codes

January 10, 2015 by Benjamin Knigge Leave a Comment

This page was last updated on September 18th 2015

Vultr logo

I’ve been looking over my Google webmaster tools and I’ve noticed a bit of traffic from people looking for Vultr coupon codes and promo codes. So I thought that I would give people what they want. I’ve been using Vultr for a several months now and I really love their service. The CPU’s on my VPS with them are fast and their network has ultra low latency. I highly recommend that you give them to anyone in need of VPS hosting.

Sign up for Vultr

use the above big green link with the coupon code “50for60” (without the quotes) for $50 in free credit. The credit is only good for 60 days after sign up so be sure to use it.

Price and Specifications

Here’s a handy price chart to give you an idea of what they have to offer.

They are currently doing a 20% off sale on the VPS over $5

PRICE $5 $10 ($8 20% off) $20 ($16 20% off) $40 ($32 20% off)
CPU 1 1 2 2
RAM 768 MB 1024 MB 2048 MB 4096 MB
DISK 15 GB 20 GB 40 GB 90 GB
DATA 1000 GB 2000 GB 3000 GB 4000 GB
Details Details Details Details

 

Vultr coupons and Vultr promo codes

Current Vultr coupon, discount and gift codes

COUPON CODE DESCRIPITON
 50for60  Using this coupon code you will have up to $52 in credit when you create new account.The first $50 in credit is only valid for the first 60 days of service.

You’ll recieve $1 in credit for liking Vultr on Facebook

and another $1 in credit for sending a tweet on twitter about Vultr

 

 Locations

Vultr has a total of 14 different data centers located around the world in the following cities and countries

  • Chicago, Illinois, USA
  • New Jersey, USA
  • Dallas, Texas, USA
  • Los Angeles, California, USA
  • Miami, Florida, USA
  • Atlanta, Georgia, USA
  • Seattle, Washington, USA
  • Silicon Valley, California, USA
  • Sydney, Australia
  • Tokyo, Japan
  • Amsterdam, Netherlands
  • London, England, UK
  • Paris, France
  • Frankfurt, Germany

 

vultr locations

Vultr locations

 

More Posts about Vultr

I’ve written several posts comparing Vultr to other SSD VPS providers.

Here are the links to those posts.

Vultr vs. DigitalOcean

Vultr vs. Linode

A comparison of Vultr with DigitalOcean, Linode and RamNode

A Vultr Review and Walk-through

 

That’s it for my post on Vultr coupon and promo codes. If this coupon expires please let me know and if you know of a better coupon code please post it in the comments. I’ll do my best to keep this post updated with the latest Vultr coupon and promo codes.

 

Filed Under: Hosting Tagged With: Hosting, VPS, Vultr

How to cloak affiliate links with Nginx

January 9, 2015 by Benjamin Knigge 1 Comment

Nginx logo

Nginx logo

What’s covered in this post

In this post I cover how to set up 301 redirects for affiliate links quickly and efficiently without the use of any plugin or redirect script using only the built in functionality of Nginx.

 

Why you should cloak your affiliate links

Analytics

I love numbers and the most accurate way to track if a link is clicked is by logging each click.  If you’re serous about making money off of your affiliate links you’re going to want to know how much each click  is worth for each program.

If you are relying on something like Google analytics, which is dependent on JavaScript being run on your web site, you could be missing a significant amount of data.  You will not be seeing links that were shared on twitter, via email or for users that have disabled JavaScript. The method I’m going to outline will log every click to an affiliate link via your servers access logs.

Search Engine Optimization (SEO)

Google and other search engines will penalizes sites for using affiliate links that are not marked as “nofollow” links. This solution will use a robots.txt file to disallow any following.

Easy to remember

A short link like “https://r.odinsql.com/digitalocean”  is easier to remember than “https://www.digitalocean.com/?refcode=f1ad4e30b2a2”

Easier to update

Lets say that one of the affiliate programs that you’re taking part of has a special offer at a different URL that will result in a larger number of conversions that you’re usually getting.  It’s a whole lot easier to update the link in a centralized location than to have to go through every blog post and update each link individually.

Why I use Nginx for affiliate link redirection

Performance

Nginx is incredibly fast at serving redirects and logging then. In the world on affiliate marketing even a few milliseconds of extra processing time can end up costing you money. You won’t find a script or plugin that will handle redirects as quickly as Nginx natively can.

Log analysis

Each click will be logged and can later be analyzed using a log analysis tool such as AWStats.

It’s free

If you already have an Nginx web server there’s no need to pay for a plugin or or script.

 

How to use Nginx for affiliate link cloaking

Create a sub-domain

First we’ll need to create a sub-domain used exclusively for redirection. In my case I’ve created the sub domain r.odinsql.com

This needs to be done with whom ever is hosting your DNS records.  I use CloudFlare  to host my DNS records. If you’re not already using a free CloudFlare for content distribution I highly recommend them.

Create a website for the new sub-domain

If you need instructions on how to configure and setup a website using Nginx take a look at my tutorial on how to do it with EasyEngine. EasyEngine is literally the easiest and most fool proof way of setting up a new website on a VPS.

Create a robots.txt file

This new website for your sub-domain is going to have a single file “robots.txt”

This is what your robots.txt should look like.

User-agent: *
Disallow: /

This tells the search engines that you don’t want them accessing anything on this site.

Put your redirect links in the new sites Nginx config file

This is what the actual config file for r.odinsql.com looks like

# HTML NGINX CONFIGURATION

server {
listen 80;
listen [::]:80;

server_name r.odinsql.com;

access_log /var/log/nginx/r.odinsql.com.access.log;
error_log /var/log/nginx/r.odinsql.com.error.log;

root /var/www/r.odinsql.com/htdocs;
index index.html index.htm;

error_page 404 = @foobar;
error_page 403 = @foobar;

location / {
try_files $uri $uri/ /index.html;
}

location @foobar {
return 301 https://odinsql.com;
}
location /hireme
{
return 301 https://www.elance.com/s/benjaminfredrick/;
}
#cloudflare
location /cloudflare
{
return 301 https://cloudflare.com;
}
#hosting sites

#linode
location /linode
{
return 301 https://www.linode.com/?r=dc324ab41e66f3facfcc6eff74acfe74a414e739;
}

location /linode-n
{
return 301 https://www.linode.com/;
}

#digitalocean
location /digitalocean
{
return 301 https://www.digitalocean.com/?refcode=f1ad4e30b2a2;
}

location /digitalocean-n
{
return 301 https://www.digitalocean.com;
}

#vultr
location /vultr
{
return 301 http://www.vultr.com/?ref=6817742;
}

location /vultr-n
{
return 301 http://www.vultr.com;
}

location /cloudways
{
return 301 http://www.cloudways.com/en/?id=18942;
}

location /bluehost
{
return 301 http://www.bluehost.com/track/odinsql/;
}

location /amazon
{
return 301 http://www.amazon.com;
}
#ramnode
location /ramnode
{
return 301 http://www.ramnode.com;
}

#sendgrid
location /sendgrid
{
return 301 http://mbsy.co/sendgrid/17518355;
}

#loaderio
location /loaderio
{
return 301 https://loader.io/s/xewK7;
}

location /loaderio-n
{
return 301 https://loader.io;
}

#amazon
location /amazon-ec2
{
return 301 http://aws.amazon.com/ec2/?_encoding=UTF8&camp=1789&creative=9325&linkCode=ur2&tag=o0c22-20&linkId=744HAUET442HAPV4;
}
}

I’ve created a location block for each affiliate link. The location is just a short name that I use for the affiliate link followed by a 301 redirect to the actual affiliate URL.  Any 404 or 403 errors result in a redirect back to my blog odinsql.com. If I need to add or edit a link I open the config edit it and then run

sudo service nginx reload

This reloads any updates that I’ve made to the config into Nginx.

For now I don’t have that many affiliate links. As I continue to blog and add more affiliate links I may decide to break this config file into separate smaller includes. For now it’s a quick and easy solution that’s fast and free.

 

If you’re in need of a quality VPS host to test this out on I would recommend Vultr. TVultr offers low cost high performance VPS with SSD whit hourly and monthly billing options available.

Sign up for Vultr

 

That’s it for this post it might be a bit too technical of the average affiliate marketer but it’s how I cloak affiliate links. If you have a question about this please leave me a comment. If you would like to stay updated regarding this blog join my mailing list by filling out the form on the right hand navigation.

Filed Under: web development Tagged With: nginx, SEO

PHP – Maximum upload file size

January 7, 2015 by Benjamin Knigge Leave a Comment

What does this post cover?

In this post I cover how to update the php maximum file upload size. Although this post is php-fpm specific the same variables will need to be edited in what ever version of PHP you are using. I also cover updating nginx.conf which is nginx specific.

Why this topic?

I manage the server for a client that is hosting WordPress on a Linode VPS. Recently they’ve decided to start doing a pod cast. When my client went to upload the audio for the podcast they encountered the following error in WordPress.

Maximum upload file size: 8mb

8mb is the default post_max_size set in the php.ini that is part of the php5-fpm package for Ubuntu 14.04 other distributions may see a similar error but with a different value

After checking and updating all of the relevant values it was suggested, and I agreed to write a brief blog post about what needs to be updated.

So if you’re encountering an error like “Maximum upload file size: 8M” here’s the solution.

Update php.ini

you will need to edit the following two variables in your php.ini

The default location for the php.ini on Ubuntu 14.04 with the php5-fpm package is /etc/php5/fpm/php.ini

post_max_size = 100M

upload_max_filesize = 100M

In the above example i’ve set the size to 100M for 100 mega bytes.  For 100 kilobytes you would use 100K and if you wanted to set the values to 1 giga byte you could use 1G. So the value is a number followed by  K, M or G without a space. You should only set the size to a maximum file size that you are likely to upload. Although it’s tempting to set the values to an enormous size this could result in the exustion of all system resources and crashing your server, so be reasonable. The value for “upload_max_filesize” is only valid up to the the limit imposed by “post_max_size”. In practice you will most likely set them both to the same value.

Update nginx.conf

You will also need to edit your nginx.conf located by default at /etc/nginx/nginx.conf on Ubuntu 14.04 when Nginx is installed via apt-get.

edit the the “client_max_body_size” in the http block of your nginx.conf

client_max_body_size 100m;

Restart PHP

You will need to restart php5-fmp before the changes take effect. Here’s how to do that on Ubuntu.

sudo service php5-fmp restart

Reload Nginx

You will need to reload the ngixn.conf before the changes that you’ve made take effect. Here’s how you reload the nginx.conf

sudo service nginx reload

 

That’s it. You should now be able to upload your files without encountering the error “Maximum upload file size: 8mb”

 

After reading through all of this you’ve decided that you would rather leave the management of you server in the hands of professionals have a look at

CloudWays Managed VPS

CloudWays offers VPS management on top of DigitalOcean’s network

If you were encountering this error I hope that this post has been helpful. If you have any comments, questions, or suggestions please let me know in the comments section below.  If you would like to have me answer your individual questions please join my mailing list by submitting the form on the right hand navigation of this page.

Filed Under: web development Tagged With: nginx, PHP, php-fmp, Wordpress

DigitalOcean vs. Vultr – which is the better VPS?

January 1, 2015 by Benjamin Knigge 6 Comments

 

Vultr vs. Digital Ocean

If you’re looking for an in depth comparison of DigitalOcean vs. Vultr you’re in the right place. In this post I’m going to outline the pros and cons of each, provide you with benchmarks and makes my own recommendations.

Let’s get started. What are the pros and cos of Each.

DigitalOcean

DigitalOcean logo

DigitalOcean has been growing rapidly in the past year. They seem to be marketing themselves to developers new to the world of visualization, and those with an extremely low budget.

Pros

low cost of Entry

The lowest cost server with DigitalOcean is currently $5 for a server with 1 cpu 512MB of ram and 20GB SSD
Scale Up
The ability to scale an individual VPS up with your requirements.

Better than average performance

I’ve included some benchmarks at the bottom of this article but to summarize DigitalOcean performs better than average in benchmarks.

Multiple Data centers

At the time of writing DigitalOcean has 7 available data centers (of 9, 2 are sold out) Located in New York (2 of 3), Amsterdam (2 of 3), San Francisco, Singapore and London

Easy to use interface

They’ve clearly spend a good deal of effort making their web interface intuitive. Of the many VPS providers I’ve used their interface is the best.

Quickly deployment of common applications

While setting up your “droplet” (DigitalOcean’s terminology for a virtual server) you are given to option to select one of many common applications. For example WordPress, Drupal, Jumla, lamp stack, lemp stack, magento this allows you to get up and running very quickly.

Cons

1GB Network

Shared 1GB network connection between all VPS on a server. This can lead to a slow connection. This is also a problem I’ve noticed on Vultr.

High network latency

The initial response times for a web request can be 100ms slower than with other VPS providers.

Slower SSDs

The Solid State Drives (SSDs) that DigitalOcean is using on it’s server are slower than some other providers.

Support

Their tutorials are terrific an the support department is generally helpful but isn’t always the most well informed. This could be the result of their rapid growth or it could just be poor training but the support department can be spotty.

DigitalOcean Benchmarks

For the benchmarks I used the benchmark script provided by ServerBear.com the tests were run on December 24th 2014 on VPS’s located in London for each provider. I chose the 1GB $10 plan for DigitalOcean to compare to compare to a $7 plan with similar specifications at Vultr.

System Specs

RAM 994 MB
HDD 31 GB
CPU Model Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
CPU Cores 1
CPU Speed 2399 MHz
CPU Cache 15360 KB

UnixBench

UnixBench (w/ all processors) 1408.5
UnixBench (w/ one processor) 1372.3

FIO

Read IOPS 49028.0
Read Bandwidth 196.1 MB/second
Write IOPS 8636.0
Write Bandwidth 34.5 MB/second

Download Speed (100MB File)

Location Rate
Cachefly 41.0 MB/s
Linode, Atlanta, GA, USA 15.0 MB/s
Linode, Dallas, TX, USA 13.0 MB/s
Linode, Tokyo, JP 6.22 MB/s
Linode, London, UK 87.6 MB/s
OVH, Paris, France 95.2 MB/s
SmartDC, Rotterdam, Netherlands 74.3 MB/s
Hetzner, Nuernberg, Germany 18.8 MB/s
iiNet, Perth, WA, Australia 1.89 MB/s
MammothVPS, Sydney, Australia 148 KB/s
Leaseweb, Haarlem, NL 58.5 MB/s
Leaseweb, Manassas, VA, USA 10.6 MB/s
Softlayer, Singapore 5.09 MB/s
Softlayer, Seattle, WA, USA 12.4 MB/s
Softlayer, San Jose, CA, USA 2.90 MB/s
Softlayer, Washington, DC, USA 3.70 MB/s

View the full ServerBear Benchmarks for this server.

 

Vultr

Vultr logo

Vultr is still new to the VPS market and I haven’t personally deployed anything with them yet.  Their benchmarks are very impressive and they have functionality some people may find advantageous.

Pros

low cost of Entry

$5 VPS with 768MB of RAM vs. 512 for the $5 VPS at DigitalOcean

Multiple Data centers

At the time of writing Vultr had data centers in Chicago Illinois, New Jersey, Dallas Texas, Atlanta Georgia, Miami Florida, Silicon Valley California, Los Angeles California,  Seattle Washington, Sydney Australia, Tokyo Japan, Amsterdam Netherlands, Frankfurt Germany, London UK, and Paris France

Support for Windows Servers

They offer support of Windows VPSs at an additional cost.

Performance

The performance of the Vultr VPS are Great as you will see when you get to the benchmarks.

Cons

Network

The data connection can be slow at times. This is also a common problem with DigitalOcean as well.

Interface

The interface isn’t as refined as that of DigitalOcean

Vultr Benchmarks

For the benchmarks I used the benchmark script provided by ServerBear.com the tests were run on December 24th 2014 on VPS’s located in London for each provider. I chose the 1GB $7 plan for Vultr to compare to the similar $10 plan with DigitalOcean.

System Specs

RAM 993 MB
HDD 21 GB
CPU Model Vultr Virtual CPU 2
CPU Cores 1
CPU Speed 3392 MHz
CPU Cache 4096 KB

UnixBench

UnixBench (w/ all processors) 2250.4
UnixBench (w/ one processor) 2261.5

FIO

Read IOPS 51840.0
Read Bandwidth 207.3 MB/second
Write IOPS 61035.0
Write Bandwidth 244.1 MB/second

Download Speed (100MB File)

Location Rate
Cachefly 31.3 MB/s
Linode, Atlanta, GA, USA 15.9 MB/s
Linode, Dallas, TX, USA 13.1 MB/s
Linode, Tokyo, JP 6.13 MB/s
Linode, London, UK 96.1 MB/s
OVH, Paris, France 95.2 MB/s
SmartDC, Rotterdam, Netherlands 67.0 MB/s
Hetzner, Nuernberg, Germany 43.4 MB/s
iiNet, Perth, WA, Australia 2.07 MB/s
MammothVPS, Sydney, Australia 54.2 KB/s
Leaseweb, Haarlem, NL 69.0 MB/s
Leaseweb, Manassas, VA, USA 16.0 MB/s
Softlayer, Singapore 4.48 MB/s
Softlayer, Seattle, WA, USA 11.4 MB/s
Softlayer, San Jose, CA, USA 12.1 MB/s
Softlayer, Washington, DC, USA 19.3 MB/s

View the full ServerBear Benchmarks for this server.

 

Conclusions

DigitalOceans tutorials are excellent and their platform is aimed more at novices. Vultr offers superior processing power, a larger selection of data center locations and support of Windows servers. There’s nothing stopping someone using Vultr or any other VPS hosting service from reading the excellent tutorials that DigitalOcean has created.

Recomendations

Vultr out performs DigitalOcean in nearly every respect when it comes to their core business of VPS hosting and they managed to do it while costing a little bit less. If you’re just beginning in the world of virtual servers and could use the additional support DigitalOcean’s tutorials are incredibly well written but there’s nothing stopping you form using them on another VPS host.   If I personally had to choose between the two I would go with Vultr. The only reason I’m still using DigitalOcean is because I have a couple of hundred dollars in non transferable credit with them. 

 

Sign up for Vultr

Sign up for DigitalOcean and receive $10 in credit

 

After reading through all of this you’ve decided that you would rather leave the management of you server in the hands of professionals have a look at CloudWays managed virtual private servers. CloudWays offers VPS management on top of DigitalOcean’s network. They have plans that start for as little as $5 and it removes the headache of having to manage your own VPS so that you can stick the development without having to worry about keeping your server stack updated.

Try CloudWays Managed VPS

I also keep track of the latest discounts and coupons available for each of the VPS hosting services mentioned in this post.

Here are the links to the applicable coupons

  • Vultr coupons and promo codes
  • Digital Ocean coupons and promo codes
  • Linode coupons and promo codes
  • CloudWays coupons and promo codes

 

That’s it for DigitalOcean vs. Vultr. I  hope that you’ve found the information in this post useful.  If you’ve noticed a mistake, have a comment, suggestion, think I’m an idiot or would like a custom recommendation let me know in the comments.  If you would like me to do some benchmarks of the other plans offered by these VPS providers let me know.  To keep updated periodically regarding new content please join my mailing list by filling out the form in the right side navigation.  Thank you for reading.

 

Filed Under: Hosting Tagged With: DigitalOcean, Hosting, Linode, Vultr

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • Next Page »

Who’s behind Odin SQL

Benjamin KniggeWhen I'm not traveling, writing code or optimizing stored procedures I can often be found working on my blog. Learn More…

Email Newsletter

Sign up to the Odin SQL newsletter and receive the latest posts and custom personalized content.

Recent Posts

  • How I improved my WordPress GTmetrix grade
  • A Vultr walk-through
  • DreamHost coupons and promo codes
  • WPEngine coupons and promo codes
  • GoDaddy vs. HostGator vs. BlueHost vs. DreamHost

Categories

  • Hosting
  • Meta
  • programming
  • Software
  • spam of shame
  • Uncategorized
  • web development
  • wordpress

Featured Post

How I improved my GTmetrix page speed and yslow scores.

How I improved my WordPress GTmetrix grade

I’ve managed to improve my GTmetrix page speed and Ylow grades from the mid 70’s to 98% for Page Speed and 97% for YSlow with a page load time of only 1.18 seconds. Here’s a link to the report (if the link is dead feel free to re-run the test). In this post I’m going to […]

Featured Post

CPU utilization

Linode vs. DigitalOcean vs. Vultr vs. RamNode

Comparing SSD cloud VPS hosting providers can be difficult A virtual cpu core at one hosting provider won’t be equivalent to a virtual cpu core at another host or even another virtual cpu core at the same host depending on the specifications of the underlying hardware and the underlying hardware’s utilization at the time of […]

Featured Post

CloudFlare

Free SSL with CloudFlare, OpenSSL and Nginx on Ubuntu

How to Save up to $750 in SSL fees for free In this post I’m going to show you how to set up your site so that you will have an absolutly free fully SSL secured site that automatically redirects non secure HTTP traffic to your secure HTTPS URL.  A basic SSL certificates commonly cost $45 – $75 per year. […]

Copyright © 2025 — OdinSQL.com