LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Webhosting solutions (https://www.linuxquestions.org/questions/linux-server-73/webhosting-solutions-944401/)

Lenux78 05-11-2012 07:53 AM

Webhosting solutions
 
Hi everybody,

I have a few questions about a small web hosting business. It is my intention to build a good web hosting solution but I have doubts about it.

First, the load balancing solution: Which would be the best load balancing solution? Layer 4 (LVS) or Layer 7 (haproxy) or a combination of those above?

Second, the DNS part: I know the basic thing about DNS but I don't finish to understand how would a new client can register his new DNS and that register would be published to the internet world!. How the companies do that?. Because I could have a DNS server and make a new register into it. And my DNS server can forward to the outside world but how the outside or internet could know my new registry?. It's a little difficult to explain my doubts.. for example. Imaging that my DNS server is www.example.com, and my client wants to register a knew dns for his company www.foo.com. I may register his company in my DNS but.. and this is my doubt.. HOW THE INTERNET WORLD WOULD KNOW?...

Third and Last one is, The software for clients. there are many of them. what is your opinion about ISPConfig v3?...

Hope Anyone can answer... and thanks!!!

Andy Alt 05-15-2012 12:24 AM

Virtual Hosting sounds like the answer you're looking for.

http://en.wikipedia.org/wiki/Virtual_hosting

RobertEachus 07-05-2012 05:45 PM

Well in general I would caution anyone from starting a company where they did not have an existing in-depth understanding. I've put some words in bold that you should be able to search for more information.

First let me suggest that you shouldn't really have to worry about load-balancing if you are serving small to medium sized business web sites. One Apache server should be able to handle many websites by using virtual host. You just need a plan for what to do if one of those sites starts getting way to much traffic. For a small web host you could redirect a website to different (or multiple) servers using DNS. Its possible to put the TTLs down to 15 minutes on domains you run so you can move things quickly.

My suggestion for DNS that you are directly running on your DNS severs should look like this;

Code:

@  IN  A    1.1.1.1
www    IN    A 1.1.1.1

Or if you needed to spread the load around you could do this to give you round robin load-balancing;

Code:

@  IN  A    1.1.1.1
@  IN  A    1.1.1.2
www    IN    A 1.1.1.1
www    IN    A 1.1.1.2

For you second question DNS is a Tree based structure starting with a "." you never see... so right now you are at "www.linuxquestions.org." that final . is called the root zone and Cashing DNS server need a hints file to know how to reach it. If a cashing DNS server was trying to look up this site (and had nothing in its cash yet) it would first talk to the root servers and they would refer the server to the .org servers by giving it the NS records and A records for the .org. server. These are called glue records. The org servers would respond in the same way. Until the cashing DNS server reached a server that responded with the address for www.linuxquestions.org. This can be seen really well by running a DNS tool distributed with the BIND DNS server called dig.

Code:

[reachus@**** ~]$ dig +trace www.linuxquestions.org

; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc16 <<>> +trace www.linuxquestions.org
;; global options: +cmd
.                      516955  IN      NS      d.root-servers.net.
.                      516955  IN      NS      e.root-servers.net.
.                      516955  IN      NS      i.root-servers.net.
.                      516955  IN      NS      f.root-servers.net.
.                      516955  IN      NS      l.root-servers.net.
.                      516955  IN      NS      c.root-servers.net.
.                      516955  IN      NS      a.root-servers.net.
.                      516955  IN      NS      g.root-servers.net.
.                      516955  IN      NS      h.root-servers.net.
.                      516955  IN      NS      m.root-servers.net.
.                      516955  IN      NS      j.root-servers.net.
.                      516955  IN      NS      k.root-servers.net.
.                      516955  IN      NS      b.root-servers.net.
;; Received 504 bytes from 204.17.139.2#53(204.17.139.2) in 792 ms

org.                    172800  IN      NS      c0.org.afilias-nst.info.
org.                    172800  IN      NS      a2.org.afilias-nst.info.
org.                    172800  IN      NS      b0.org.afilias-nst.org.
org.                    172800  IN      NS      b2.org.afilias-nst.org.
org.                    172800  IN      NS      d0.org.afilias-nst.org.
org.                    172800  IN      NS      a0.org.afilias-nst.info.
;; Received 442 bytes from 192.112.36.4#53(192.112.36.4) in 799 ms

linuxquestions.org.    86400  IN      NS      ns5.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns3.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns4.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns1.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns2.mydyndns.org.
;; Received 219 bytes from 199.19.56.1#53(199.19.56.1) in 124 ms

www.linuxquestions.org. 1440    IN      A      75.126.162.205
linuxquestions.org.    86400  IN      NS      ns5.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns2.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns3.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns1.mydyndns.org.
linuxquestions.org.    86400  IN      NS      ns4.mydyndns.org.
;; Received 155 bytes from 208.76.60.2#53(208.76.60.2) in 105 ms

So either your customers would need to register their own domain names and have the register point the domain to your DNS servers. (Customers would need the Name server names like ns1.mydyndns.org and the IP address associated to it as well.)
OR
Your customers could control and manage their own DNS pointing to the IP address(es) of the web servers you want to use for their site(s).

For more information;
http://en.wikipedia.org/wiki/Domain_name_registrar

Just remember that you need to keep a very close eye on usage (CPU, MEMORY, BANDWIDTH, and DISK SPACE just to name a few.) You need to be able to predict when you are going to run out... so you need to know how much a new customer is going to use and how fast existing customers are growing. I would recommend you find a way to graph this information and make sure you look at it AT LEAST once a week and ensure that it alarms if it goes past a thresh hold that is before everything comes crumbling down.

Two servers in two different locations both running BIND and APACHE should get you near to ready.

Some other thoughts;
You need to make sure that any changes to the websites happen on both servers maybe use RSYNC?
You need to monitor the capacity it may be worth paying some one to do it for a small number of servers.
As far as the software for the clients... ask your potential clients, they may not give you the names of software packages but you need to have some requirements.

Hope this help you!


All times are GMT -5. The time now is 08:26 PM.