Link to home
Start Free TrialLog in
Avatar of Silas2
Silas2

asked on

Linux Hosting

I am creating a few Magento shops for some different clients. At the moment I'm using an ISP with OTB shared hosting package. Its ok, dirt cheap....but...I'm stuck with apache and like all shared packages, I'm very limited with what i can do to the server.
I'm considering moving to a virtual box at Rackspace (or similar), where I can use ngix+varnish+turpentine and the Magento installs i've seen running with these are noticeably more responsive.
I'm thinking of what'll I'll need to get up and running (and which will need maintaining) e.g.  MYSQL - I don't know if there are issues running on the same virtual box as the web server or if its better to split them...I'm thinking of setting up some sort of fail-over as well...
I'm not a linux admin so I'm thinking of using a freelancer for the setup and maintenance.  
I'm just really asking for general advice from people more wise in these matters than me.
I'm trying to give a Rolls-Royce hosting service for bottom dollar just for my own ECommerce customers to make my development look better!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

you are going to need at minimum 2 servers preferably on different racks or different datacenters (preferred) and a server as a load balancer.  and put all of the files on a filestore that is in more than 1 region. Global is preferred.  One of the first questions the supplier will ask you is what is your bandwidth and the percentage of incoming vs outgoing traffic.  Most websites have considerable more outgoing than incoming.  Your customers will want to know what sort of SLA you are going to provide.   If the server host can only assure 4 9's you can't offer an sla of 5 9's.. A virtual private server may give you the best bang for the buck.  I would look at Amazon Web Services, Microsoft Azure, and Google Compute offerings... to keep my costs low I use a mix of Amazon S3/Glacier and Azure.  You may also want to investigate using Cachefly or other CDN's as well. Cloudflare is also a good option.

Experts Exchange uses both cloudflare and Amazon Cloudfront
Avatar of Silas2
Silas2

ASKER

Forgive me, what does:
If the server host can only assure 4 9's you can't offer an sla of 5 9's
mean?

I am thinking of starting with low ambitions as this is for small businesses who won't know the difference between me busting a gut to put something together and a shared ISP OTB.
What about failover for the nameservers? Is that routinely deployed?
4 9's  => 99.99%
5 9's  => 99.999%
Usually refers to uptime guarantees of service level agreements.
Avatar of Silas2

ASKER

Thanks, I really appreciate your help. I'm not too worried about my SLA's, more about whether its a viable alternative for me to maintain on a shoestring with the help of an off-shore Linux guru.
What would be the minimum memory you think I could get away with, I know i'm suggesting memory-caching pages with Varnish/Turpentine, but I'm assuming the initial installs to be very quiet and I could hold off on that till I had a few more serious ones.
Minimum for ngix+MYSQL +  ? Could I get away with .5 Gig for starters? (Rackspace prices suddenly shoot up after that)
Would you split the MySQL + the ngix?
as I understand the sites you are going to host won't get much traffic - you are going to show them off to your clients only right?

for that reason you don't need load balancer or separate nginx+php-fpm and mysql. Put everything on one box. Sign up for backups of course.

a few notes on the software:

use PHP7-fpm + nginx (php7 almost 2x times faster than php5), magento 2 supports php7 out of the box,  magento 1.x supports it with Inchoo patch https://github.com/Inchoo/Inchoo_PHP7

you are right on varnish - use it, magento 2 supports it natively

to get even more out of resources install HHVM http://hhvm.com/, hhvm is even faster than php7 but only magento 1.x supports it  - https://www.goivvy.com/blog/hhvm-php7-magento

5G Ram should be plenty if you don't expect high traffic - but you don't as I understand

I find Debian 8 is the easiest OS to run a server, it has all the latest packages via apt-get command - just google how to install a package you need.

I host my development sites on linode - i find it cheap and reliable, for only $10/mo i get 2G ram.
Avatar of Silas2

ASKER

Thanks for that. My intention is not just for demo, but I'm just getting into Ecommerce as a developer and I'm thinking that after my initial few shops for which I'm using a shared ISP so I'm stuck with what I'm given, I might think of a whole virtual server. So you reckon 2Gig would be enough?
Bear in mind a quiet shop would be lucky to get 50 visits a day I should think.
Once I've got three or four I can up the hardware.
How much of what you mention could I get on 2gig?
ASKER CERTIFIED SOLUTION
Avatar of Konstantin Gerasimov
Konstantin Gerasimov
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Silas2

ASKER

I'm thinking about the future, those hosted plans are $100pcm ish, Rackspace is offering a blank image pre-loaded with an optimised magento install (ngix etc) so I was thinking of dipping my toes in early in a small way so I can offer it myself later.
What are the biggest issues do you think about offering hosting?
once everything is setup it pretty much runs by itself

biggest issues:
1. keep your software updated to prevent hacking attempts
2. monitor your space so that you have don't 'disk is full' errors
3. watch for DDOS attacks
4. security, security, security. forget passwords, use public/private keys to get into your server. use SFTP instead of FTP.
Avatar of Silas2

ASKER

Sorry to keep asking but I really appreciate your help, how can you stop/ameliorate DDOS attacks?
that is a tricky part

cloudflare offers ddos protection service - https://www.cloudflare.com/ddos/ - but I haven't tried that

we encounter scraping attempts from time to time where scrapers send us hundreds of requests per second thus taking us down

what I do (very simple technic)
1. set CPU usage > 90% email alerts in linode hosting
2. once I get an alert I ssh and enable nginx logs quickly
3. I look through logs and see what IP is scraping us.
4. deny that ip in nginx.
5. reload nginx

if DDOS is a real problem for you then look into automated solutions because what I described won't save you from major attack.
Avatar of Silas2

ASKER

Thanks very much for your help. I'm taking a deep breath. If you configure a cloud service like AWS/Rackspace can you get a budget server to produce blisteringly fast Magento loading times?

I've seen some really good ones , I'm think that if you've got memory cached pages+fast web server+CDN's even with a per-hour budget virtual server those big providers have as fast a connection to the internet as anything and you could get good performance....or not....?
you are right you can configure magento to run super fast on a budget server but there are still limitation on how many orders per hour it can handle...
Avatar of Silas2

ASKER

If the guys are processing a lot of orders they can pay for some more memory!
The usual limitation is the sql server not the web server as the more traffic the more requests for data so you need to think about scaling the sql/MySQL servers and their disk subsystem (IOPS)
Avatar of Silas2

ASKER

Thanks for that comment. Over xmas I met a project manager for infrastructure for a big city bank (as you do over canapés) , and he said they were going over to 'DR enabled turnkey virtual servers' , I think he said AWS does them. I don't know if that works with DNS servers as well or the turnkey bit sorts all that out...do have any experience?