How do you add a server?

Discussion in 'Web Design and Development' started by Jas123, Jul 13, 2010.

  1. Jas123 macrumors member

    Joined:
    Apr 1, 2008
    #1
    Could someone explain to me the process of moving from one server to two?
     
  2. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #2
    Can you be more specific. Are you trying to set up a db server and a web server?
     
  3. Jas123 thread starter macrumors member

    Joined:
    Apr 1, 2008
    #3
    I was referring to a web server; but knowing about a db server would be just as helpful.

    web server = apache
    db server = mysql
     
  4. DoFoT9 macrumors P6

    DoFoT9

    Joined:
    Jun 11, 2007
    Location:
    Singapore
  5. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #5
    Do you mean, adding another server, because one is having trouble keeping up?

    You need to explain a little better your situation. More information, the better.
     
  6. Jas123 thread starter macrumors member

    Joined:
    Apr 1, 2008
    #6
    Sorry, I am not trying to be vague.

    OS: linux
    Sever: Apache

    and the reason is to scale up because the web server cannot keep up with load.

    Qualifier 1: this is not actually happening; I am trying to understand the process/steps in growing a website outside of one box.

    Qualifier 2: trying to understand it from the point of having direct access, thus managing the servers itself.


    I believe I would need a load balancer, but how is that implemented? how would I configure the servers? which ip's would they be listening to? how could i scale a database (mysql) server?
    I don't know how load balancers work, technically.

    I feel like this can get really complex; so I am trying to learn the overall steps
     
  7. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #7
    Is your mysql on the same hardware as your apache? Is they are, first step would be to have your own database server. Next, you need to identify if it is your apache or mysql that is buckling under load. From there, depending on your application and the access patterns of your users, there's a few path you can take to relieve the stress.

    Sometimes, it's not a good strategy to just keep throwing hardware at it. You need to find what out what's really happening. Stuff like badly constructed sql queries, bad application flow that forces users to keep hitting a page etc. Scaling up on web server is easy, scaling up on database is more complex.
     
  8. Jas123 thread starter macrumors member

    Joined:
    Apr 1, 2008
    #8
    Angelneo, How would I scale the web server? and How would I scale the database?

    I'm not sure if you read one of my earlier posts, but this is all hypothetical. I'm trying to learn the process/steps, because right now I only have a slight understanding of what would have to be done.
     
  9. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #9
    This is not something that could just be described to you in a couple posts. There are many many books written on these subjects: Databases, Web Servers, Building Scalable Websites... For that reason, I think you will be somewhat displeased with the response you get here.

    You either need to talk to someone who does this for a living (a hosting provider) or look into options possibly with Amazon's S3 service. There are others out there, but this is a good place to begin learning.

    It doesn't sound like you programed this database, is that true? What's your role here...?
     
  10. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #10
    Actually, I'm also quite new to this area, forced to learn all this to handle my own overload situation.
     
  11. Jas123 thread starter macrumors member

    Joined:
    Apr 1, 2008
    #11
    Matthew Yohe, I was hoping that someone could conceptualize the process for me; but perhaps this is more difficult than I thought.
     
  12. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #12
    Well, no one knows your knowledge level, so we would first have to root that out and then go from there...

    I'd be more than happy to answer some questions and lead you on the right path but I'm not sure if this is the best place. Feel free to send me a message on AIM.
     
  13. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #13
    I have several servers for various clients with multiple server set ups. Since I have no idea what you're asking, I'll just throw an example out there.

    One client of mine, who has a social networking website, has 6 servers.
    1. 2 Load Balancers
    2. 2 Web Servers (In the cloud)
    3. 2 Core Database Servers

    This system is set up for complete redundancy. The load balancers transfer traffic to the proper web servers in the cloud. We chose to put the web servers in the cloud so we can expand within minutes. If you know your traffic you can potentially use physical servers, it's up to you. The webservers then in turn query the database servers and immediately replicate across both of them for writes and redudnancy (we're talking milliseconds). Typically, one would do a master slave set up, but for our sake and a few other clients we replicate it instantly for a master master. In this case, we have 2 core database servers sharing the load as well as they are exact duplicates of one another in case something does happen to the data.

    This scenario is completely redundant so if a LB, web server, or core db server goes down, we're fully covered for optimal uptime.

    I've attached a Screenshot for visual. It may not be EXACT for the super nerds, but it was used for visualization purposes.

    Our more serious set ups also have dual power supplies, multiple electrical circuits in our cabinet, and dual NIC cards in case of extrememe emergencies.

    We also make backups every night, week, and month and send them offsite to another facility in Georgia. For our more serious clients we also make backups every 2 hours.

    Hope this goes into some real world example for you.
     

    Attached Files:

  14. dmmcintyre3 macrumors 68020

    Joined:
    Mar 4, 2007
    #14
    You could use nginx or lighttpd instead of apache, or if you want direct compatibility with apache you could use litespeed.

    apache would run out of ram with almost no traffic and nginx handled the load without a problem on the same server. RAM is now only ~1/3rd used.
     

Share This Page