Okay I had some crazy Idea to just buy a server and host it from home. I know one down side might be downtime due to power outages and what not, but do you think this should even be done? I have a 10mb connection and the server would be prob a dual 3.0 xeon with 2-4gb of ram what kind of speeds could I expect from that? Lets just say the site would be your average forum site pretty mysql hungry and pretty active 2-3k uniques a day. Im just making that site up but would the site appear to be slow or would it run smoothly?
could be easily done on that kind of hardware. I serve up to 500 uniques per day on my 1.2Ghz Athlon. Before you buy the hardware you should check if your connection is stable enough. Small downtimes really add up fast when running a web host. As for power outages... uninterruptible power supply? But then again, I guess it depends a lot on the quality of your electricity network. We barely have any outages here in Europe for example.
It's possible, though are you experienced in server management? If not the it's a non starter. Also you'll probably need a quicker line than a 10mb connection.
Yeah I know a ton about servers and webservers I know it can be done I was just wondering if it would be too slow with the 10mb connection. Some hosts I've seen though only use a 10mb connection. Also I think I can signup for a business account and get a faster connection.
My connection is always on and it's stable really stable. Our power goes out once or twice a year due to bad storms but that's it really.
depends on your site. If you want to host downloads, it will lag of course. If it's just serving html and the occasional image, it could work out I guess. I never hosted something off a throttled line so I don't know for sure. If you are currently serving the same site off another server, you can install a bandwith cap on that server to match a 10mbit line and try that first.
You'll be fine. A 10mb connection is orders of magnitude more than you'll need. In fact you'd likely be more than fine with a .5mb connection. All of my hosting and server needs (outside of when I crawl for my search engines) use up less than 1mb - and I'm seeing millions of pages a month. I had a site go to 50-100+ visits per second and IIRC it cracked 6mbs. That's what I'm talking about . If you remember the days of T1 lines, well a T1 line is only about 1.5mbs. In short, most people grossly overestimate what they need for webhosting. A home connection these days via DSL or cable is oodles more than even most hosting companies need.
I host 2 myspace sites from my home. and of course my blog www.georgeboone.com I have them on a simple P4 Dell Poweredge 400SC with a gig of RAM. And a charter 2meg connection. I save absolutely ridiculous amounts of hosting bandwidth doing this. The downside is I can't play Halo online anymore because it lags But it's definitely worth it. Charter has been pretty reliable (that reminds me your ISP must not have a clause that says you can't have servers on your connection) Another plus is it's really cool to be able to work on files on my local system and not have to FTP them to a host
Your 10MB connection means nothing if it's only 128KB up. When you are hosting you need a massive Upstream bandwidth, not downstream.
that does not have to be by the way. you can use a traffic shaping script like wondershaper. Before using the script, I had pings up to 800ms when the server was busy, now I have rock stable 40ms no matter what #!/bin/bash # Wonder Shaper # please read the README before filling out these values # # Set the following values to somewhat less than your actual download # and uplink speed. In kilobits. Also set the device that is to be shaped. DOWNLINK=5500 UPLINK=480 DEV=ppp0 # low priority OUTGOING traffic - you can leave this blank if you want # low priority source netmasks NOPRIOHOSTSRC='192.168.1.20' # low priority destination netmasks NOPRIOHOSTDST= # low priority source ports NOPRIOPORTSRC='7 20 25 80 3724 8080 3724 64925' # low priority destination ports NOPRIOPORTDST='7 6881 25 110 80 8080 64925' # Now remove the following two lines :-) ######################################################### if [ "$1" = "status" ] then tc -s qdisc ls dev $DEV tc -s class ls dev $DEV exit fi # clean existing down- and uplink qdiscs, hide errors tc qdisc del dev $DEV root 2> /dev/null > /dev/null tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null if [ "$1" = "stop" ] then exit fi ###### uplink # install root CBQ tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit # shape everything at $UPLINK speed - this prevents huge queues in your # DSL modem which destroy latency: # main class tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \ allot 1500 prio 5 bounded isolated # high prio class 1:10: tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \ allot 1600 prio 1 avpkt 1000 # bulk and default class 1:20 - gets slightly less traffic, # and a lower priority: tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \ allot 1600 prio 2 avpkt 1000 # 'traffic we hate' tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $[8*$UPLINK/10]kbit \ allot 1600 prio 2 avpkt 1000 # all get Stochastic Fairness: tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 # start filters # TOS Minimum Delay (ssh, NOT scp) in 1:10: tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ match ip tos 0x10 0xff flowid 1:10 # ICMP (ip protocol 1) in the interactive class 1:10 so we # can do measurements & impress our friends: tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \ match ip protocol 1 0xff flowid 1:10 # prioritize small packets (<64 bytes) tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \ match ip protocol 6 0xff \ match u8 0x05 0x0f at 0 \ match u16 0x0000 0xffc0 at 2 \ flowid 1:10 # some traffic however suffers a worse fate for a in $NOPRIOPORTDST do tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ match ip dport $a 0xffff flowid 1:30 done for a in $NOPRIOPORTSRC do tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ match ip sport $a 0xffff flowid 1:30 done for a in $NOPRIOHOSTSRC do tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ match ip src $a flowid 1:30 done for a in $NOPRIOHOSTDST do tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ match ip dst $a flowid 1:30 done # rest is 'non-interactive' ie 'bulk' and ends up in 1:20 tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ match ip dst 0.0.0.0/0 flowid 1:20 ########## downlink ############# # slow downloads down to somewhat less than the real speed to prevent # queuing at our ISP. Tune to see how high you can set it. # ISPs tend to have *huge* queues to make sure big downloads are fast # # attach ingress policer: tc qdisc add dev $DEV handle ffff: ingress # filter *everything* to it (0.0.0.0/0), drop everything that's # coming in too fast: tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 Code (markup):
You can download Linux Fedora or Ubuntu Server, put in the disk, tick the server option and your LAMP server up and running in under half an hour. For hobby sites, it's fine (there are likely to be security holes if you're not a sysadmin legend so I wouldn't use it for high profile stuff - forum should be fine). I'm about to host my own blog at home as a Linux learning experiment.
And remember that besides a server, you'll need a firewall and a back-up device as well. Electricity isn't free unfortunately.
I'm on a Windows Server. I got a spare license from work that I'm "borrowing for testing purposes" for Windows 2003 Enterprise Server I found a good post on lifehacker that might help me here though so thanks for getting me thinking
Yeah if you know what you're doing linux iptables are easy to configure for good security. Whatever router you have will also have a built in firewall and of course you should only forward the ports you need forwarded to your server. UPS systems are pretty cheap on eBay and they can buy you a couple of hours but if your power is ever out for a full day there's not much you can do I've been doing this for years and I've never had a single day where my sites were down all day. I very rarely have outages. Also, DONT FORGET ABOUT DNS! I use www.dnspark.net. It's FREE but my myspace sites get so much traffic I had to fork over $9.95 for extra queries. They give you something like half a million queries free every month but if you pay $9.95 for one year you get 5 million queries per month.
ewww, Windows. he doesn't really need external nameservers. could as well run BIND or some windows equivalent. I do ns1.mydomain.com A <my IP> ns2.mydomain.com A <my IP> mydomain.com NS ns1.mydomain.com mydomain.com NS ns2.mydomain.com it's not quite RFC compliant because it's only a single IP but if you are hosting from home, it's likely that nobody can access your server anyway if your DNS server does not answer if you insist on an external DNS, free alternatives are zoneedit.com afraid.org