Suggest: VPS for 6.5GB Database/Php app - High availability
In continuation to my thread How to counter/mitigate DDos attack
I've got some details from the client so I seek some good cost effective solution for the following requirement. I'll be glad to have some serious offers & recommendations to proceed further.
Unfortunately I Do NOT have daily payload values for CPU / Disk I/O / RAM but I will give what info I got from the client.
It is a 9 year old site with a big number of users and is required to be of _somewhat _high availability.
It has average 40-60,000 Visits with upto 100K pageviews per day.
Bandwidth consumed is around 1500GB per month + will need extra 500GB for Syncing 2 VPS's.
MySQL Database is a massive 6.5GB and its a Php sales force app made in CakePHP and some other PHP frameworks.
Storage is around 150GB (I'm not sure about this)
Majority of Traffic comes from US, so I'm looking to get one primary server on east coast and secondary VPS on west coast, create a cluster of them so the DB & files remain in Sync. ( Need suggestions on this)
I'm most concerned about the massive database size, as I have never come across a MySQL DB of that size (have dealt with MS-SQL's). I presume the Disk I/O's will require Good SSDs and ample RAM. I will however try to get SSH access to monitor payloads more precisely. Suggest me something to look for so I can be more precise in planning the Shift on a NEW VPS.
It's good if you have more information about CPU, RAM, and preferred location.
This may already have been covered in your other thread; it would be useful to know the specifications of the server the site is currently running on.
6.5GB db is not massive by any standard.
It's fairly large, to be fair.
It's larger than my 4 websites running in 2 years
Indeed it is... to squeeze out some more performance make sure to use temporary tables and if IO is not enough consider using ramdisk for your temp dir.
Also syncing a database with another server is a pretty tough task if there's a lot of inserts updates and deletes. You may have to go with another solution.
Not so tough after all..
Why not a dedicated server? with that DB size I believe LET prices VPS will suffer.
and your budget?
It's not very massive but the number of operations might be an issue if he estimates 500GB just for syncing databases.
I believe it's just an overestimation though, and SSD servers should be able to handle it well.
We are running a website consisting of 70GB file and 15GB database, and having 2+ million page views on $30~ linode without many problems. (More precisely, 3x1G plus an attached storage for files)
However if you are looking into a west-east cluster, the database sync could be a big problem for you. If they are running solely on innodb then probably you can try galera on mariadb/mysql. Otherwise you might be in trouble.
Also you can try find something in the middle instead of the coasts. For example pinging from SFO to DEN gives me 30ms.
6.5GB may not be "massive" however it is not small either and unless expertly crafted and cached and constantly looked after it is not suitable for any old VPS, SSD raid 10 would be best but frankly if it was mine I would be looking for a small dedi with an SSD.
Actually, DB size is irrelevant. What's significant is the number of concurrent users and/or what the workloads are.
A 10GB database with only one concurrent user is easy to manage. A 100MB database with 100 concurrent users is less so.
A 10GB database where everyone is just reading and there's only one or two who occasionally write is easy to manage. A 100MB database where you have tons of people writing/updating simultaneous is much less so.
A quick random suggestion from me is to go with BuyVM. They have east+west+europe locations with some DDoS protection, and free anycast to provide minimum latency from customers, and full SSD, and bandwidth pool, and much more, for a low price.
Yep, but the OP said:
"It is a 9 year old site with a big number of users and is required to be of _somewhat _high availability.
It has average 40-60,000 Visits with upto 100K pageviews per day."
So based on that and having to make a few assumptions myself that would be the approach I would take.
That's a pretty small database, just get a dedicated with 8-16gb ram and completely handle db requests through ram, you don't really need a SSD.
Also note that a cluster won't protect you from DDoS.
To cluster mysql you could go for mariadb galera cluster, I am using it on a xenforo board with a ~8GB database, works, but you have to convert all tables to innodb.
For failover you could use rage4 DNS with an uptime monitor that sends notices to rage4 through webhooks, nodeping/uptimerobot/statuscake support webhooks.
For file-sync, unison is great and realiable, just use a cronjob to sync files every 1-5mins.
That is an excellent idea. Lots of RAM, keep the DB entirely in RAM. It'll fly. And you won't find anything faster, so if you still have issues then you know you need to look at code or CPU.
Yep - sorry, I was just making a narrow response to the common idea that bigger DB = needs more power. I think as you point out the other info the OP provided on pageviews is the more significant factor.
Budget is something I'm here to look for and plan, thats why I seek advice what would be the right VPS/DEDI/Hardware/Hosting provider to go with to have a good price/performance combo
@msg7086 --- you relieve me of doubts by telling 70GB / 15GB site running on 1GB VPS. I had no idea if that was "doable".
@raindog308 your insight is absolutely right, that's why I've asked for a SSH access from the client to conclude the IOps and Realtime RAM and CPU usage. Not to forget, clients (non-tech) tend to overtell their specs way more than they really are
I run an 11GB database in a 6GB VPSDime VPS on SSD disk. That $7/mo thing is faster than my old dedi.
I have an update... the Client's application sends around 200,000 emails a DAY... Yes !! Daily to their ~ 1.5 million subscribers.
That is some serious mailing... I checked mandrill and it quotes around ~$1000 mark for this amount of outgoing mail.
Please note that this is purely Solicited mail... to the subscribers like daily Birthday Reminders, Task Reminders and other attached services.
Can you suggest a solution?? I'm leaning towards RAMNODE to get a 8GB KVM VPS. (will check with them too). Do you think LEB hosting providers will/are allowing and handling such massive SMTP loads ?
Delimiter's basic X5150 dedicated server will do the job - 16GB RAM, 500GB disk, Dual X5150, 5TB bandwidth $20/month (paid quarterly).
So long as the mails are opt-in and not spam, they'll be fine with it.
thanks @Mark. Yes all these are duly registered users to whom the application sends daily updates, plus 3 mails to each New subscriber, which averages around 100-150 daily.
@Mehargags - so no problem.
+1 for Linode.
how good is Lease Web? They are NL based I guess and a pretty big Datacentre company, isn't it?
They have some promos going on https://www.leaseweb.com/bare-metal-server/all-servers
I strongly recommend you to tell us your budget.
Suggestions for $500/month are completely different than those for $50/month.
Like we said before, if you have much budget you can grab 2 or 3 dedis across the states. If you are looking for $50/month then probably 3xBuyVM or 2xLinode would be a better choice.
I'm hovering around $200 Budget for this, but I'm flexible if the solution is good and ensures proper mitigation of DDos plus smooth Mail operation which is the most important part.
You should get a dedicated server for that amount of storage and database.
It is tiny as it is in the same magnitude of the memory instead of disks.
I think the cross-datacenter redundancy is way overkill.
The work load can be handled by a single VM, but you may want high-availability in case the VM/host/switch dies. Get a provider who support
For the DB, you can have MySQL master/slave setup in one DC, and one async replication in another DC for extra data loss protection.
The static assets can be rsynced to another DC as well, and I think CDN is always a good idea to deliver massive contents.
Note: the plan has not covered the backup and crash recovery yet. It is hard to get it right without knowing your budge and your tolerance on the data loss.