Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

New here but I post on StackOverflow pretty often.

The scenario:

I am a paying customer of linode. On that account I have one 2GB server which hosts a web application. This single server currently acts as a web (apache2), database, email, and nodejs server.

I'm planning on releasing my web application to 20,000 targeted users next week. All is well in saying this, but there's one problem that's bothering me. That problem being that the web application may completely fail as it does some pretty heavy file handling operations on the back-end. Of course I know that not ALL 20,000 users will be signing up to my application in an instant, but it may potentially get 20,000 hits. I want my server to support this high amount of traffic, so this is why I'm preparing for it's launch.


My question(s):

How should I add further linodes to support potential increases in traffic to my website?

Should I:

A) Just buy a bigger linode to expand my website. Double the power means that the server can handle twice as many users, right? Of course I understand that there are limitations with this too as linode don't offer linodes with unlimited hardware resources. This wouldn't involve buying any additional private IP addresses either, would it?

B) Buy the node balancing package from linode to expand my website? Does this mean I have to clone my current disk image and distribute it to all new linodes I buy? If this is the case, how do I handle newly uploaded user files? Should I have a linode especially for this too? Also: Is there a limit as to how many linodes I can buy and 'attach' to the node balancer and does each need an additional private IP address? How about pushing new code changes to the website? How would I deal with this if all source files were on different servers? How about SSL? would my current certificate continue to work across all servers?

Is there anything else I need to consider?

Apologies for all of these questions but I need a thorough idea of how all of this stuff works. I've done a few hours of pre reading on the topic already, but some of the things above have confused me a bit.

Cheers,

Joel

share|improve this question
add comment

closed as too broad by John Conde Sep 27 '13 at 22:31

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 1 down vote accepted

Just buy a bigger linode to expand my website. Double the power means that the server can handle twice as many users, right?

Increasing server capacity is certainly easier. It sounds like you have a small enough server that it would be cost effective as well. Generally, I would recommend increasing your server first, then load balancing once that is no longer cost effective.

This wouldn't involve buying any additional private IP addresses either, would it?

There are no additional IP addresses required when you stick to a single (larger) server.

Buy the node balancing package from linode to expand my website? Does this mean I have to clone my current disk image and distribute it to all new linodes I buy?

Even with a load balancer there are many resources that must be shared between the two:

  • A single database
  • A place to put user uploaded files
  • Session data

Your code will probably have to change to handle cases in which resources are no longer local.

If this is the case, how do I handle newly uploaded user files? Should I have a linode especially for this too?

You have to find a place for uploaded files that can be accessed from all servers. There are several approaches to this.

  • A dedicated server
  • A database
  • Distribute the files across the servers and have an algorithm for determining which server owns which files.

Is there a limit as to how many linodes I can buy and 'attach' to the node balancer and does each need an additional private IP address?

I'm not familiar with linode specifically, but generally tens of servers can be connected to each load balancer. Each server would need its own IP address. This could be a private IP address on a local network with network address translation, or it could be a public IP address.

How about pushing new code changes to the website? How would I deal with this if all source files were on different servers?

Each server will need to get a copy of the changes. It is common to use rsync or a source control system such as git for this purpose.

How about SSL? would my current certificate continue to work across all servers?

You will be able to use your existing certificate but specific implementation depends on the load balancer. There are two common senarios:

  • The certificate is installed on the load balancer. The load balancer handles the encryption and talks to the servers in plain text.
  • The certificate is installed on each server and the load balancer sends encrypted requests between them.
share|improve this answer
    
What a fantastic answer. You don't understand how much confusion this has cleared up for me :) I think I will go down the route of updating the server (linode) for now. I don't have all of the money in the world to spend on this project, but it's nice to know what my options are if the project does end up going somewhere. Thank you! –  Joel Murphy Sep 27 '13 at 22:08
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.