Home > Programming, Servers & Scripts > Hosting, Servers & Security

Advice needed for VPS setup (6)


03-09-2016 07:10 AM #1 whtang (Member)
Advice needed for VPS setup

Hi,

Im planning to use a VPS for dynamic content, logging and other server side stuff. What setup do you recommend for me?

My current setup looks as follows:
Tracker:
Voluum

File Storage:
Amazon S3

Content Delivery Network:
Amazon Cloudfront

VPS:
none


My questions:
1) Which VPS do you recommend and why? minimum requirement is 2 Gig memory and SSD drive for lets say 5k - 100k traffic?
2.1) How do you protect yourself? with Cloudfare? Does this impact loading speed?
2.2) do you use cloudfare in combination with Amazon S3 / Cloudfront?

3.1) Which VPS setup up do you recommend? like recommended OS, Software and settings?
3.2) Do you setup new VPS regulary (like 1x a month) to prevent ddos, spies and others?
4) Do you separate static content from dynamic content? like all the static content on CDN and the rest on VPS?
5) Other recommendations / advices?

Kind regards

Whtang


03-09-2016 11:23 AM #2 caurmen (Administrator)

@whtang - what specifically do you want to do with the VPS? Your setup looks fine to me unless there's something very specific you want to do - and a VPS will add costs and complexity.

In answer to the questions specifically:

1) If you are familiar with Linux system administration, I mostly use Digital Ocean. They're pretty good. I've heard good things about vultr too. If you're not, you need managed hosting - Beyond are my usual go-to recommendation there although I'm always interested in hearing others.
2.1) NONONO. Cloudflare are great, but not for AM - too much of a speed hit. As for protection, it very much depends - what are you worried about? Privacy? DDOS? Something else? The one thing that you MUST do for protection is avoid running anything that isn't vital on your server, and in particular don't run bloody Wordpress on it!
2.2) You don't, basically. Cloudflare does the same thing as Cloudfront in that it's a CDN - but Cloudflare is focused on anti-DDOS and fraud prevention.
3.1) Depends what you're doing. For PHP-heavy work I'd recommend absolutely bog-standard Ubuntu, Apache with mod_php, MariaDB. But for other uses I might use Nginx (static content), Node (more modern dynamic stuff), or indeed custom-coded C on any number of weird OS combos.
3.2) No. You could, though. Not too hard if you automate it intelligently.
4) Yes, that's smart. You can also stick the static content on a VPS running Nginx and nothing else - that'll be extremely fast and handle ridiculous volumes of traffic (10 million requests a day or more) with minimal provisioning.
5) As mentioned above, this all depends on what you want to do specifically. There's a lot of things that you DO NOT need a VPS for, and these days I'd recommend avoiding getting one unless you need to. You're adding a lot of additional maintainance overhead compared to just using an S3/CDN combo.


03-09-2016 11:39 AM #3 whtang (Member)

Thnx for answering these questions. really helpfull :-)

Quote Originally Posted by caurmen View Post
2.1) NONONO. Cloudflare are great, but not for AM - too much of a speed hit. As for protection, it very much depends - what are you worried about? Privacy? DDOS? Something else? The one thing that you MUST do for protection is avoid running anything that isn't vital on your server, and in particular don't run bloody Wordpress on it!

2.2) You don't, basically. Cloudflare does the same thing as Cloudfront in that it's a CDN - but Cloudflare is focused on anti-DDOS and fraud prevention.
The main reason to use a VPN is for dynamic content, geo location, logging and other server side stuff like building a list etc. in the near future i want to use self-host tracker / cloaker and other usefull software. The reason i ask about Cloudflare is because privacy and DDOS stuff. So im curious what you think about using cloudflare for privacy and DDOS protection vs performance.



Quote Originally Posted by caurmen View Post
3.2) No. You could, though. Not too hard if you automate it intelligently.
Interesting. Could you elaborate this? are you using VMware technology to do this?


03-09-2016 11:59 AM #4 caurmen (Administrator)

OK, that makes sense.

Dynamic content: you can do most of that using Javascript. If you're worried about not being able to use JS to do something specific, let me know what it is - there's probably a way.
Geolocation: you can pull the location from Voluum and display it / run conditionals with Javascript. Again, if there's something specific you can't think of a way to do with JS, let me know.
Logging: S3 has pretty comprehensive logging, as does Cloudflare. Anything specific you want to log?
List-building: I'd recommend starting with something like aWeber and moving up as needed. Granted, you'll want to go to a self-hosted mailer at some point, but that's a very different proposition to a "normal" affiliate VPS. You don't need to do it until you've got at least 10k subs IMO.


Self-hosted tracker and cloaker are definitely good reasons to get a VPS. I'd talk to the makers of your chosen tracker and cloaker to get recommendations on the best system at that point - they can offer much more specific suggestions.

Honestly, the odds of you getting DDOSed are not high unless you're massively visible. At that point your best move is to hire a specialist in server hardening. As for privacy, all it does is cloak your IP, which isn't that important unless you've got a footprint from it, which if it's a fresh VPS you probably don't. Cloudflare is great for a lot of use cases - I use it - but for AM it's just too slow, IMO.

Automating migrations: I'd use something like Docker if I was doing this a lot. Failing that, though, just having a well-tested import/export bash script for all your content will do the job. If you're using a host like Digital Ocean you could even simply rely on snapshotting your server and deploying a new, identical one on a new IP. The only hassle would be moving DNS records.


03-09-2016 02:02 PM #5 whtang (Member)

Quote Originally Posted by caurmen View Post
Logging: S3 has pretty comprehensive logging, as does Cloudflare. Anything specific you want to log?
Mostly IP addresses, loading speed etc

Quote Originally Posted by caurmen View Post
List-building: I'd recommend starting with something like aWeber and moving up as needed. Granted, you'll want to go to a self-hosted mailer at some point, but that's a very different proposition to a "normal" affiliate VPS. You don't need to do it until you've got at least 10k subs IMO.
I wasnt thinking about using an autoresponder yet but a simple database where i can contact information of the visitors.

Quote Originally Posted by caurmen View Post
As for privacy, all it does is cloak your IP, which isn't that important unless you've got a footprint from it, which if it's a fresh VPS you probably don't. Cloudflare is great for a lot of use cases - I use it - but for AM it's just too slow, IMO.
Is there are guide regarding removing footprints? i know if someone knows your landing page urls they can find out your IP address etc


Quote Originally Posted by caurmen View Post
Automating migrations: I'd use something like Docker if I was doing this a lot. Failing that, though, just having a well-tested import/export bash script for all your content will do the job. If you're using a host like Digital Ocean you could even simply rely on snapshotting your server and deploying a new, identical one on a new IP. The only hassle would be moving DNS records.
Interesting :-). Which digital ocean package do you recommend?


03-09-2016 03:15 PM #6 caurmen (Administrator)

OK, all that logging can be done using a combination of Cloudfront logs and Pingdom, I believe.

Footprint removal - the SEO guys are the experts. In general, though, just don't run anything else important off your main VPS and remember that you'll need to change domain AND IP to avoid being connected to the old one. Oh, and watch out for using the same tracking scripts with the same IDs in multiple places.

Digital Ocean packages - whichever one I need They just differ in size and power - test one, if it's not powerful enough, upgrade! Takes about 3 min.


Home > Programming, Servers & Scripts > Hosting, Servers & Security