Why Bootdev — Dynamic CDN

In the old days, we put images, css / js, woff etc any assets to CDN, so that clients can download somewhere that geographically optimised.

Around end of 2012 – early 2013, new idea comes out like we should CDN everything, so that we can reduce the complex architecture with memcache, page cache cluster (Varnish) or even microccache etc. Just 1 layer cache and having everything to CDN. Like architecture below.

dnamic cdn

Your website domain name will directly point to CDN with CNAME. And then the CDN will point to your load balancer address or your web server. So it is like a proxy. When you do create, it will 100% bypass CDN and goes to web server, when u do UPDATE, the CDN will update from web server then invalidate itself, when you do DELETE, the CDN will bypass request to web server and invalidate its cache. When you read, it read from the CDN, not from web server. So the CRUD action can be completed.

You will need your own cache invalidation strategy, like send update to cloudfront / using versioning object or url.

Here is a sample conf of how we bypass some URLs to go to web server, and making Drupal works.

E1EB6A9C-17EC-446D-AD59-80B471A4F962 62367506-DDC3-4E5C-8F05-24E2D20DBBBB

With AWS cloudfront, you can bypass header ORIGIN, so that you can preform CORs actions. Also you can use similar header bypass feature to detect mobile/PC. With such architecture well setup, theoretically, you can have unlimited PV, as your server wont be really hitted. Your bound will be write DB bound only, which is not a concern in most case.

If you don’t want to understand all these, but want to lower your cost and have higher traffic and faster response, contact bootdev at founders@bootdev.com ! We can deploy Dynamic CDN to you in minutes no matter you are using AWS or not. We can point our CloudFront account to your server, it can be Azure, Linode, or any bare-meter. It just need to be Drupal, and you can enjoy the best performance ever.

ref: https://media.amazonwebservices.com/blog/cloudfront_dynamic_web_sites_full_1.jpg

Linode vs AWS pricing

Recently, i moved my linode to new plans and compare it with latest EC2 pricing. I have myself 2 “1024” and 1 “2048” server in linode which just cost USD45 per month. Personally which is a very good deal. I served my clients on AWS as AWS can do much more things and actually cheaper if you buy bigger servers.

It is actually not easy to find a better price between them if you have no data on your application. In my application, bottleneck is on Memory instead of CPU. I believe most application are same with me, that is why Linode pricing plan base on Memory as well.

Monitoring

If your server shows CPU always 10-20% and you are running websites / PHP things. This price comparison may be useful to you.

Memory

Screen Shot 2014-12-17 at 2.11.21 PM Screen Shot 2014-12-17 at 2.10.38 PM

Comparing Linode 8192 plan and EC2 m3.large, the monthly price is AWS more expensive. But, dont forget Linode require USD20 extra for the backup plan, so it will be same price as AWS. Someone may say AWS lot fewer computation power, i agree with it. My application is memory driven, so i don’t care.

In my case, AWS is cheaper when the machine is more powerful. Like if we just need 1024 / 2048 memory, USD 10/20, you can buy nothing in AWS, but you can have really good servers at linode.

Extra features

While price don’t change, AWS also offer VPC, cross region AMI copying, IAM user control, load balancer pay by traffic, nearly free S3 storage which you will be expensive to have all these in Linode.

Availability

One of the problem of Linode is their servers will sold out. So, for enterprise usage, like ElasticMapReduce / Auto-scaling, you cannot do it on Linode. Remember, High availability is cost. AWS reserved many instance in each data center, so that you can pay for it when you need it. Linode cannot offer like if I need 10 more servers anytime I want.

Summary

In Summary, i would suggest people to use Linode if you are just considering to have < 4096 memory per server. You dont need architecture like separate servers into NAT zones.

If you are serving big server architecture, you are better to go for AWS due to rich features and availability. And for the big servers, AWS actually 50%+ cheaper when you go for the pre-paid reserved instances.