Create a CDN across 2 servers - cdn

I have a dedicated server in the US and a virtual server in the UK and I would like to be able to serve a site from either server depending on which one is closer to the user.
How would I go about doing this?

Ok, you should probably have an appreciation of GeoIP and GeoDNS.
However if that's too much reading, take a look at this near identical question from the Server Fault SE site, as the answers give some good pointers.

Depending on how busy your site is, I'd just pony up for CloudFront or another PAYG CDN

Related

Do I need a CDN or can I just go with ngnix loadbalancer (cache)

I have a system that will generate image optimization and resizing for a client who has a news portal with lots of pageviews. We will provide only the images to this portal, but users are all on the same country as the our server. The question is, whats the best strategy thinking about cost-benefit:
Route all(most) image traffic via some paid CDN
Setup an internal image server using nginx and a loadbalancer
Monthly we estimate a bandwidth of 11TB, with millions of requests. (images only)
It is not a questions if it is possible or what is more cost efficient.
You need to calculate the costs based on many factors: Actual sizing of your servers. Amount of servers. Bandwith. Where are the servers located and much more.
It will be a lot of work to setup and maintain / monitor your own CDN probaly but sure you can do it.
I dont think that anybody can create this calculation for you. See the comment fro Rob. It is not realy a question for SO.

How does a request reach the correct server?

When I enter 66.211.160.88 into the web browser, how does my computer manage to find the correct server behind that IP? The request is sent to the ISP, but now what? How does it know exactly which way to take?
a video that illustrate your question can be viewed at
http://www.youtube.com/watch?v=XP61HtbGPbA,
for a bit more complete simple explanaition you can refer to:
http://computer.howstuffworks.com/internet/basics/internet-infrastructure.htm
for a simple and yet good overview of the way things go.

CDN suggestions for Wowza

Currently I am looking at different CDN networks to bring our site, VOD and the VOD content to a CDN based solution.
Requirements:
a) A Webserver (Apache, Mysql) (not necessarily) and
b) A Streaming Server (preferably Wowza), which has to have the VOD Content cloud-based,
meaning edge-oriented. (necessary!)
The reason I need Wowza is because it covers a very big spectrum of streams for end-devices,
and security, which we need. (and please don't suggest Amazon streaming, because it's flash)
The problem in general we had with amazon etc. is, that they do offer a good CDN network, but a) I didn't find their price strategic quite easy to see through, and b) - which is more important - they do not (!) offer to use Wowza on their cloud / edge oriented. Therefore it doesn't really make sense to me to use Wowza with Amazon.
My question is: Are there other good CDN networks (like edgecast etc.) that you can recommend? Akamai seems quite expensive. Edgecast I asked already (they'll come back to me yet).
I am happy for all answers. Thank you!
Edgecast doesn't offer Wowza streaming, but you may want to check with some of the folks listed at http://www.wowza.com/partners.
With Amazon, you're essentially rolling your own CDN by creating instances in different regions.
try Amazon CloudFront. They say anything that serve with HTTP will work.
I'm running 3 Wowza boxes on AP region, and now running FMS + CLoudFront for my scalable livestreaming project.
Yet to test Wowza + CLoudFront
Edgecast is FMS based, not wowza.
ScaleEngine is a wowza CDN (disclaimer, I work for ScaleEngine) - all the origins, and all the edges, are wowza. They can set anything in Application.xml you need, or install your custom module, or run a mid-origin setup from your single wowza server.

What's an easy way to do a DDoS experiment without breaking any big rules?

I thought of buying my own website www.zzzwew.com and doing a DDoS on it, but it looks like that won't work...
So if I get a goDaddy page and try to DDoS it that would hurt GoDaddy's general service?
GoDaddy will get really pissed, and possibly press legal charges if is a large enough scale (DISCLAIMER: Stack Overflow is a terrible place for legal advice). Mainly because even if all you are doing is attacking a server you own, you are also seriously stressing their network and equipment getting all that traffic to the server, which may affect other customers as well.
You're best bet is to do this completely isolated on your own hardware using a local network and make sure all traffic goes through equipment you own.
Just a general observation: Probably not the best idea to sign up for a site and have your very first post be to ask how to conduct a Denial of Service attack.
You haven't said why you want to do this, so I suspect many people here will be leery of answering your question. Having spent a number of years in the computer security field, I can tell you that the world doesn't need any more hackers. There are some legitimate reasons for learning to to perform Denial of Service attacks (such as protecting yourself from them), but I'd suspect that anyone actually needing to do such a thing for legit reasons would already own a site and know the ramifications of a DDoS.
The short answer to your question, though, is this: were you to buy a GoDaddy account for the purpose of conducting DDoS experiments, you might want to hire a good lawyer first. GoDaddy's a big company with a lot of resources, and I suspect they take DDoS attacks on their shared servers very seriously.
I don't mean to sound flippant with my answer, especially if the motive for your question is legit, but if you really need to do tests like these, you need to do it on an inhouse server.
If I were you, I would get a box and set it up on your own network. Getting a Godaddy account and dosing it can hurt other people that share it with you. Furthemore, in some areas, it is illegal to own DoS software. Check for your area.
Why do you need to test this? To learn how to mitigate it. Lots of people have done it and you can just follow their work.
My advise however, if you really want to learn how to DoS is to get a box. A simple desktop for 199 will work. Put some linux OS on it with apache.
Put up a simple page. and google around for some tools. LoIC is what Anonymous used during an attack on master card and paypal. Most of them ended up in jail.
Things to watch out for:
Make sure that the computer your attacking with and to are not on the net. Use a switch to connect the two machines -- just so you don't accidentally take someone else down.
This will also provide you the best case scenario. Omega. You will have the highest bandwidth to the target. Bandwidth is what you really need for most DoS attacks.

Using EC2 Load Balancing with Existing Wordpress Blog

I currently have a virtual dedicated server through Media Temple that I use to run several high traffic Wordpress blogs. Both tend to receive sudden StumbleUpon traffic surges that (I'm assuming) cause the server CPU to run at 100% and slow down everything. I'm currently using WP-Super-Cache, S3, and CloudFront for most static files, but high traffic is still causing slowdown on the CPU.
From what I'm reading, it seems like I might want to use EC2 to help the existing server when traffic spikes occur. Since I'm currently using the top tier of virtual dedicated servers on Media Temple, I'd like to avoid jumping to a dedicated server if possible. I get the sense that AWS might help boost the existing server's power. How would I go about doing this?
I apologize if I'm using any of these terms incorrectly -- I'm relatively amateur when it comes to server administration. If this isn't the best way to improve performance, what is the recommended course of action?
The first thing I would do is move your database server to another Media Temple VPS. After that, look to see which one is hitting 100% CPU. If it's the web server, you can create a second instance, and use a proxy to balance the load. If it's the database, you may be able to create some indexes.
Alternatively, setting up a Squid caching server in front of your web server can take off a lot of load from anonymous users. This is the approach Wikipedia takes, as the page doesn't need to be re-rendered for each user.
In either case, there isn't an easy way to spin up extra capacity on the EC2 unless your site is on the EC2 to begin with.
There is just 3 type of instance you can have. Other than that they cant give you any more "server power". You will need to do some load balancing. There are software Load Balancers, such as HAProxy, NginX, which are not bad, if you dont want to deal with that, you can do DNS Round Robin, after setting up the high load blogs on different machines.
You should be able to scale them, that s the beauty of AWS, scaling.

Resources