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:
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
@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.
Thnx for answering these questions. really helpfull :-)
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
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.
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.