Ideal Site Setup?

Ideal Site Setup?

So you have the next big site idea, so how do you setup your site, I mean do you need a wordpress site, or email, or what have you? Lets make some assumptions right now as the focus is going to be the following.

DNS
Email
Webhosting – WordPress Site
Backups

Lets focus on each one. So first up is DNS Sorry but I can only recommend CloudFlare. If your starting with a domain or two, there is no reason to focus on your own DNS servers, CloudFlare is free for what the begining site is going to pull, DNS wise. Now this is limited to 100,000 requests a day. So if your pulling that many requests you will have to upgrade to their next plan. However if your pulling in that kind of traffic, your making some money so you can respectfully afford it.

Up next Email. This is an interesting one for me, as I personally use my gmail for 90% of what I do but many people have a TLD email they want to us. So for this, I would recommend a simple shared hosting plan for your email need. I personally love Name Crane ( Buy VM ) They have a plan as cheap as $8/year for your email. There really is now no need to setup a dedicated mail server unless you have tons of emails accounts, or pushing thousands of emails a day. https://namecrane.com/store/da-shared-hosting

Now lets look at your website. So you want to have a WordPress Site. You have a startup idea, lets say its Video/Audio related which means a lot of disk space. So with this I personally use and recommand two accounts/VPS/Dedicated Server(s), and here is why.
VPS 1. Your main Website ( WordPress Site ).
VPS/Dedicated 2. Your video/audio files.

So what to do, well lets look at the two parts, up first is your website. For this were going to start out assuming your a smaller site, so under 50 requests/second. Now for your reference. 50 reqs/sec = 3000/reqs/minute = 180,000 requests/hour = 4,320,000 requests/day or 129,600,000 requests/month. In the real world your site because of plugins and such, will over drive the following recommend setup for your “base” setup. However if your pulling that kind of traffic thats great! In my eyes scale up, or reach out to us here and we would be glad to help put together a solution for you.
So what I personally use and recommend is the following setup.

Linode Shared CPU:
2 GB’s RAM
50 GB’s Storage
3 TB’s Bandwidth
$12/Month.

Ok, so you have a VPS now, so what do you do with it? Well lets get our setup going, and then install some sort of Webserver, Database Server, and PHP. I am not going to go over all the details, but I personally recommend WordOps for this. Read this for a short how to on installing WordOps: https://theserveradmin.com/wordops/ Now why did I choose this over say cPanel, DirectAdmin, Cyperpanel or such? Well I think for a site like this, there is no reason to setup a control panel when you need only a site or two. Why waste the money and time on a control panel, let alone the resources, and potentially opening up more code to any faults/mistakes.

I decided on WordOps with Redis as the caching server. So I decided to setup that above VPS with WordOps and do a little testing.

Server Software:        nginx
Server Hostname:        wordpress.theserveradmin.com
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-ECDSA-AES256-GCM-SHA384,384,256
Server Temp Key:        X25519 253 bits
TLS Server Name:        wordpress.theserveradmin.com

Document Path:          /
Document Length:        85548 bytes

Concurrency Level:      50
Time taken for tests:   3.687 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      86060000 bytes
HTML transferred:       85548000 bytes
Requests per second:    271.20 [#/sec] (mean)
Time per request:       184.366 [ms] (mean)
Time per request:       3.687 [ms] (mean, across all concurrent requests)
Transfer rate:          22792.39 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3   84  46.9     85     168
Processing:    19  100  46.9    101     185
Waiting:        0   79  47.8     79     165
Total:        181  184   2.1    183     189

Percentage of the requests served within a certain time (ms)
  50%    183
  66%    184
  75%    185
  80%    185
  90%    189
  95%    189
  98%    189
  99%    189
 100%    189 (longest request)
root@localhost:~#

As you can see I stopped at 50 concurrent users, and managed to squeeze out 271.2 requests/second. Now with this, the load went nuts, and the site almost became unusable. BUT that is pretty darn cool. I mean lets do some math, that little VPS “could” under some sort of magical needs, pump out the following.

271 req/sec = 16,260/reqs/minute = 975,600 reqs/hour = 23,414,400 reqs/day or 702,432,000 /reqs/month.

Now lets be fair, thats just not going to happen on a $12 VPS, the system would crash, and you would burn up your traffic in a day. However from a technical side, that is pretty darn cool.

So we covered your basic website, some uploaded images, your plugins, now the big part, your content and I mean your podcasts, videos, audio, downloads. Well this one can be done pretty easy actually, with the power of Caddy behind your download server, and a potato can power this. Now this is a big step and will take a minute or two of planning. What do I mean by this? Well how much data do you have? Lets assume your running a Video site, either teaching videos, adult videos, demos, you name it. Well you have to figure out your disk usage, and bandwidth, oh let us not forget your traffic usage. What I mean by this is the number of potential views at the same time. This is a bigger one, as depending on your servers specs will help determine this.

So we are going to focus on a Video site, and the usage/stats first, then I will go into more details on how to set this up.

So you have figured out by looking at your directories of files that you have 125 GB’s of files right now. Great! Now we need to find a price point we can work with. So there are several options.
Option 1. Base VPS with Block Storage
This can be done with a $12/Month VPS from Linode with a $16/Month Block Storage attached.
This also requires some more technical stuff, but not super hard, but one more thing to look at.
Option 2. Get a second but bigger VPS. The closet plan is a 160 GB’s from Linode and it is $48/Month.
Option 3. A Dedicated Server: I personally love several companies, but I used Reliable Site for my larger Dedicated Server. For this we do not need a ton of power, and right now they have a killer deal on their Intel Special, which is a random Intel 4Core System with 32 GB’s of RAM, and a 1 TB SSD, which is more then enough power to stream a bunch of data, oh also its a 1 Gbps unmettered pipe/bandwidth.
Oh yeah, that killer deal is $45/Month

Now for a test. I just ran a test against a 29MB movie trailer.

Now what were the results? Well this was a full optimized trailer, I mean your movies are optimized right?
So pulling in 1000 downloads, pulling 50 concurrent connections, this is the results.

Server Software:        Caddy
Server Hostname:        demo-eu.demo.net
Server Port:            443
SSL/TLS Protocol:       TLSv1.3,TLS_AES_128_GCM_SHA256,256,128
Server Temp Key:        X25519 253 bits
TLS Server Name:        demo-eu.demo.net

Document Path:          /F1.mp4
Document Length:        30478022 bytes

Concurrency Level:      50
Time taken for tests:   21.347 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      30478265000 bytes
HTML transferred:       30478022000 bytes
Requests per second:    46.84 [#/sec] (mean)
Time per request:       1067.371 [ms] (mean)
Time per request:       21.347 [ms] (mean, across all concurrent requests)
Transfer rate:          1394263.73 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    3   3.2      2      23
Processing:    93 1058  47.1   1065    1094
Waiting:       40   45  11.3     43     132
Total:         96 1061  46.5   1067    1100

Percentage of the requests served within a certain time (ms)
  50%   1067
  66%   1070
  75%   1071
  80%   1074
  90%   1081
  95%   1089
  98%   1093
  99%   1095
 100%   1100 (longest request)
root@le1mp4-1-47:

Now there are a few items to note, some things look a little “low” or not really impressive. Well lets look at this. 1st item, the video, well its a full on trailer, its 30MB’s insize and 50 people at the exact same time are looking at it. Now what can we see.

Concurrency Level: 50
Complete requests: 1000
Total transferred: 30478265000 bytes
Requests per second: 46.84 [#/sec] (mean)
Transfer rate: 1394263.73 [Kbytes/sec] received

So that tells me the following. Serving up a 30 MB file, we can see that this little box, can push out that 30 MB file to 50 People at the same time, pushing 46.84/request/second. Also pushing that same 30 MB video it transfered 30478265000 bytes which is 30.478265 Gig’s of data in 22 seconds. Yes 30 GB’s in 22 second. Now for speed the test shows Transfer rate: 1394263.73 [Kbytes/sec] which is 1.39426373 Gigabytes. So yeah this will easily fully saturate that network port before the server craps up.

Now something to really think about, the above test is just raw speed and now fast the webserver can pull the file and send it to you. Video doesn’t work that way, you stream it ** Assuming your site is not a download site, but audio/video. 1080p video requires about 5Mbps to stream, so more and more people can stream at the same time.

So I think I have touched on the server, now the big one Backups.

I am going to break this into several different items.

  1. Site Backups
  2. Download Server Backups
  3. Backup Software

Now were going to need something to back these up to, well personally I love iDrive to do this, and I used them on all my servers, a good read is over here. https://theserveradmin.com/s3-buckets-mounting-as-user/ I personally mount this is /backups and poof you have your backup drive space mounted, and currently iDrive has a 1 TB sale going on for $19.75/first year, then $39.50 then on out.

So lets get that WordPress site backed up, Well personally I used Updraft, I have found it to just work, I have backed up, restored, transfered, and all that, with a 100% success rate.

What I do is pretty simple, I have the Updraft do its job, set this for a day or two * this is all you need as you will be backing this up everyday, and it will run out of space after a year or so. Then have a cronjob rsync the WordPress folder over to your /backups Poof there you go! Full backups.

Now the Download Server, well personally I don’t back these up, why? Well don’t you have these files on your pc and backed up to an external drive or a NAS? Why have another backup **** Now I am 100% for having a third backup, but to start off, I don’t think its worth it, but again its only $19.75 so why not?

Lets recap now.

We want a WordPress Site, and this site is a Video site. You want some trailers, and some educational videos. You have 150 GB’s of videos that you want to start to offer out of the box.

So the following setup will easily get you the following.
Website – Able to handle at least 50 people at the exact same time, in the exact same moment, looking at the exact same things.
Download Server – Same as above but downloading the trailers, videos, what have you.
Backups – Should be self explained.

Costs on a 1 years startup.
Using Linode and Reliable Site, and iDrive as the source of the VPS, Dedicated, and Backups
VPS – Linode: $12/Month = $144/Year
Dedicated Server – Reliable Site: $46/Month = $552/Year
Backups – iDrive: $19.75/Year
Email Hosting – Name Crane: $8/Year

So for a total of the following $723.75/Year you have have a full Video/Audio site online and generating you money or a monthly cost of $58/Month and a year up front costs of Domain + Backups + Email or $9.95 + $19.75 + $8 or $37.70 Upfront. Thats not bad for a startup, and really if your not download anything you can cut that Dedicated Server out of the picture, especially if your using say YouTube as the video platform of hosting choice.