We are investigating further Magento speed improvements. What we see now is that with the following setup the page flies. Only the images come later. The main files are delivered in a couple of milliseconds, but the loading time is still 2 seconds because of the images.
- mage caching
- merge css/js
- minify apc + memcache
- htaccess tweaks
- session/cache on tmpfs
My question: what are the steps to setup a CDN (on my own server)?
(and does it actually help)
I understand it is something like this (but this is not at all working):
- create cdn subdomain
- change document root (and/or why set a cname?)
- change config
Best Answer
A CDN or Content Delivery Network general works by using a service that provides servers all over the world to quickly deliver media files to the end user cutting down on network latency. This means a CDN benefits your webshop when you have customers from all over the world visiting your shop.
So what you're proposing to do is strictly taken not really a CDN. But that aside there are a couple of things you can do.
To serve images from a subdomain you will need to do the following: add the subdomain to your DNS (cdn.shirtsofholland.com), add a server alias to your Apache configuration for the existing package where the shop is running on.
Forwarding the subdomain to this package, and then in the Magento Backend go to
System > Configuration > General > Web > (un)secure url
changing theBase media URL
tohttp://cdn.shirtsofholland.com/
The process for your own server is called Domain Sharding. [Update 11jan2017] Since HTTP/2 Domain Sharding has almost no benefit anymore
In case you do want a real CDN, look at a service like OnePica, Magento extension can be found here or Amazone AWS, Using Ashley Schroder tutorial