Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Web Server

Hey Guys,

I'm looking to host my own website from home, I've never hosted my own site from home, usually I just use godaddy, but I want to host it on my own this time. I anticipate my website will have up to 10,000 - 50,000 members who will be using the website very often.

The site is built using HTML5/CSS3, JavaScript, JQuery, PHP, and MySQL There is user interaction, uploading files, and chat

I plan on using an Ubuntu server, what kind of Computer specs would I need to handle that traffic. Would I need just one server or multiple servers, and how would I configure those server(s), I'm really lost can anyone point me in the right direction

2 Answers

If you're going to run your own server at home, there are a bunch of factors you'll need to consider. Do you have a static IP or dynamic? If the latter, you'll need to look into a dynamic DNS service as well. Is your internet service residential or a business class type of service? If it's residential, do they allow customers to run servers on their network?

Your internet service speed is also a consideration. You are anticipating a sizable volume of traffic, and most likely your internet upstream is considerably slower than your downstream; i.e. 50Mbit down and 5Mbit up. Your upstream is the traffic you are going to serve, meaning that when someone accesses your website, they are going to be limited to the speed of your upstream, and are competing with others for it.

If you are going to host a pretty active site, you're also going to want to be concerned about downtime. If your power goes out, how long can you last on batteries? If the power goes out on the whole street block or part of the neighborhood, will your internet service still be active? Your ISP may not have backup power on the local street hubs.

Besides the questions you are looking for answers on, of the type of computer and operating system, there are many other factors to consider - especially if you are planning on a higher volume site. For that reason, I would strongly recommend you look into colocation service or rent service space somewhere.

Can you expand on "static IP or dynamic" I couldn't understand, and its residential, I checked they allow servers, the internet speed wont be an issue, I just checked my download speed is around 45mbps and upload is 5mbps, It's unlikely the power will go out, NYC isn't known for blackouts.

I was going to use Ubuntu as the OS and I haven't decided on the hardware, I actually don't know what type of hardware i'll need to support upto 50,000 members. I don't have the resources for an entire server room, only for a few servers.

Well an IP address is a unique set of numbers for a device on the Internet, and having a static IP means it will never change. It's like having a mailing address for a house, or a phone number. It's the number identity on the Internet you can be reached at. Whatever domain or subdomain you use (like mydomain.com) will be linked up to an IP address.

The ideal setup for running a site would be to have a static IP. You can contact your ISP about getting a static IP if you don't already have one. If you don't have a static IP address, you're running on a dynamic IP, which will change from time to time as it's released back into the pool of IP addresses on that network. If you use a dynamic IP address, you'll need to use a third party service with software on your computer that will always ping the dynamic IP service and tell them your current IP. The dynamic DNS provider will then update the records of your domain with the current information.

You said your speed is 45/5. Again, I would recommend you put your server on a host somewhere with a faster connection if you are planning on pretty high volume of traffic. It is not the 45 Mbits users will be accessing, it will be the 5 Mbit upstream. Your upstream is their downstream, and filling up that upstream will also affect your 45 meg downstream, as you wait for requests to leave your upstream.

Being in NYC, you have quite a large backbone of providers running through there and quite a few companies that allow colocation (putting your server in their rack or closet), and many will allow you to physically access it when needed.
If you go with colocation though, you're going to want to find the smallest or slimmest server you can find. I would suggest looking into a Mac mini for instance, you can find them at a good price used even, and they can run Ubuntu linux as well.