/    Sign up×
Community /Pin to ProfileBookmark

server arrangement

finally getting around to asking this question its been on my mind a while.

so lets say I have a website with one server, be it a rented one or my own. this server has a database and can manage a fictitious number of requests at any given time, lets say 5000. my website grows and I need to add another server to manage the extra requests, when setting up the second server do I need to copy the database and its contents from the first server onto the second or does the second server work off the database on the first server? the latter doesn’t seem right because the first server can still only handle x amount of requests regardless of an extra server. the first seems cumbersome, what actually happens with multiple machine websites?

to post a comment
Full-stack Developer

11 Comments(s)

Copy linkTweet thisAlerts:
@jay5rJun 05.2017 — When you outgrow a combined web & database server you have a few options. The first thing most people do is to use a CDN for static documents. That can take load off the server. The next step most people take is move the databases to a dedicated server. Having your databases on a server that can only be reached on a local network increases security considerably.

But it takes a lot of traffic to outgrow combined servers.
Copy linkTweet thisAlerts:
@TrainJun 05.2017 — You normally use a load balancer setup.

For a idea about that

https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts

May want to check out cloud computing as it does have advantages that maybe what you want too.
Copy linkTweet thisAlerts:
@NogDogJun 05.2017 — And then start thinking about Amazon AWS, or Microsoft Azure, etc. ?
Copy linkTweet thisAlerts:
@coleioauthorJun 05.2017 — When you outgrow a combined web & database server you have a few options. The first thing most people do is to use a CDN for static documents. That can take load off the server. The next step most people take is move the databases to a dedicated server. Having your databases on a server that can only be reached on a local network increases security considerably.

But it takes a lot of traffic to outgrow combined servers.[/QUOTE]


so there are different types of machines used for web servers as opposed to database servers? what is the architecture of a cdn like? a load os web server and database servers in a network along with load balancers to manage traffic?

how much traffic can a combine server manage?


You normally use a load balancer setup.

For a idea about that

https://www.digitalocean.com/communi...ncing-concepts

May want to check out cloud computing as it does have advantages that maybe what you want too.
[/QUOTE]


if going the cloud route, do I have to worry about networking and traffic flow between servers on the cloud or can I just say to aws hey, gimme a hosting and server setup that can handle x amount of traffic and then let them do all the technical stuff?
Copy linkTweet thisAlerts:
@NogDogJun 05.2017 — I'm not an expert, but I know it's possible to configure AWS with a load balancer and 1 to n web servers, with a setting that says when traffic (or CPU, or whatever) reaches level X, add Y more web servers. That then requires additional "stuff" that will load your application onto it, and so forth.

PS: Hopefully by the time your site reaches a traffic level that needs such processing power, you'll be hiring an engineering staff that will include a Devops person with more detailed knowledge on it. ?
Copy linkTweet thisAlerts:
@coleioauthorJun 05.2017 — I'm not an expert, but I know it's possible to configure AWS with a load balancer and 1 to n web servers, with a setting that says when traffic (or CPU, or whatever) reaches level X, add Y more web servers. That then requires additional "stuff" that will load your application onto it, and so forth.

PS: Hopefully by the time your site reaches a traffic level that needs such processing power, you'll be hiring an engineering staff that will include a Devops person with more detailed knowledge on it. ?[/QUOTE]



thanks, hopefully yeah. I'm not being ****y, I just like to plan for best and worst case scenarios, best case my site reaches 5m members, I imagine that's too big for something like aws but it could be a starting point.

thanks for all your help lads
Copy linkTweet thisAlerts:
@NogDogJun 05.2017 — AWS will scale to whatever you need (at a cost, of course ? ).
Copy linkTweet thisAlerts:
@jay5rJun 05.2017 — so there are different types of machines used for web servers as opposed to database servers? what is the architecture of a cdn like? a load os web server and database servers in a network along with load balancers to manage traffic?[/quote]

A server is a server is a server, but each server can be configured differently. If you're the type of person who's asking the questions you're asking, then how exactly the server is tuned isn't really something you need to worry about. IMHO, you should have a fully managed server and it's your host's job to properly tune your server.

[IMHO, given the level of hacking, DDOS attacks, etc. these days no one but a specialist should manage a server. The last thing the world needs is another unpatched zombie computer that's controlled by a botnet.]

how much traffic can a combine server manage?[/quote]

Quite bit. In rough numbers, I'd say a (good) single server could pretty easily handle a two or three Alexa 100,000 sites before you'd have to start thinking about things like load balancing or separating out your database to a separate box. Now, you might have latency issues in far corners of the world, but a CDN could mostly resolve that.

if going the cloud route, do I have to worry about networking and traffic flow between servers on the cloud or can I just say to aws hey, gimme a hosting and server setup that can handle x amount of traffic and then let them do all the technical stuff?[/QUOTE]

It depends on your site architecture. One of my friends/competitors works with mostly static files. He does no database lookups despite the fact that his sites are pretty big. So yes, for someone like him, cloud computing is rather simple – because his needs are simple. I have another friend who has a highly complex architecture – and for him cloud computing is incredibly complicated.

In general though I think it's important to note that different technologies solve different problems. Define your problem and [I]then[/I] pick the best solution for that problem. It feels like you're getting the cart before the horse and trying to solve problems before you even have a hint of a problem. Cloud computing may or may not be the answer to your future problems. Or it might not be. The best solution to a problem is the simplest solution, and cloud computing is not often pretty complicated.

To me the biggest downside of cloud computing is that you're required to do a lot of your own support. I've been doing web stuff for 20 years, and have managed my own server for a portion of that time. But these days when the **** hits the fan, I want really good server support I can call on to help me fix the problem. There are some people who will manage a cloud environment for you, but the costs are significantly higher than managing a dedicated server.

Personally I have a managed server that serves all my dynamic pages (PHP hitting MySQL), then I have one CDN that has good world-wide distribution and good tech that I use for all my small static files. And then I have another CDN that gives me cheap rates to serve video files. Cloud computing isn't the right solution for my particular needs.
Copy linkTweet thisAlerts:
@coleioauthorJun 05.2017 — yeah I am getting ahead of myself no doubt, what is alexa`100,000?
Copy linkTweet thisAlerts:
@TrainJun 05.2017 — https://www.google.com/search?q=alexa`100%2C000%3F&ie=utf-8&oe=utf-8
×

Success!

Help @coleio spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...