Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Big Board Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multiple server Nic cards-public and private Details »»
Multiple server Nic cards-public and private
Version: , by alexi alexi is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-23-2006 Last Update: Never Installs: 0
 
No support by the author.

I have seen a lot of questions on this subject and I happend to have some graphs handy so I thought I would put up a post that should help all "big" boards understand this a little better.
In a multi server setup the web server needs to talk to 2 different places. The internet so users can come and get their data and the database server to get the information they are requesting. This diagram shows that relationship:


The web server should have 2 seperate NIC cards, one facing the internet and 1 facing the database server. Even if your traffic is not that high trying to do this over 1 nic card is not a good idea because database requests will have to wait for the web requests.
The database server NIC will handle far more traffic than the public NIC. Let's look at some graphs. This graph shows 24 hours on my web server. That would be about 300 users at the low and 2200 simoultaneous users at peak



The blue line represents the amount of data going out to the users, the green line represents the data coming in. Notice that there is far more going out as the web server serves up the pages. The "95th percentile" a measure of how much bandwidth you use is 4.97 mbits or megabits per second so out to the users a 10 based connection would be more than enough.

Here is the same graph between the webserver and the database server:



In this case the blue line, way at the bottom represents the data from the web server to the database server. The green lines are the database server returning data to the web server. Notice how much more data goes over this connection than actually goes out to the users. That is one of the reasons it is so important to have it on a seperate nic card. Also note that the 95th percentile is 38.8 mbit so you would not be able to run a 10 based nic card you need a 100 based to not create a bottleneck. It is not neccesary to run a gigabit card although you would still see some improvement from that as it would let stuff get "off the wire" quicker at peak load.

Hope this helps!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-23-2006, 04:01 PM
khalid khalid is offline
 
Join Date: Nov 2001
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very informative alexi and nicely presented.

Thanks.
Reply With Quote
  #13  
Old 04-24-2006, 11:35 PM
FlyBoy73 FlyBoy73 is offline
 
Join Date: Jan 2002
Location: Texas, USA
Posts: 297
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great example.
I was billed almost $1,900.00 in overage expenses from my host one month because the PNet was not setup properly and my dual server setup was talking publicly over the net. The communication bandwidth was huge between our web server and our database server. I thought it was inaccurate, and not to contest the billing, but because I did not know they "chattered" that much..

Thankfully, they dropped the overage because it was partly their mistake. Needless to say they were happy to supply a crossover cable after this at no charge and give the data base server the single connection to the web server only.
Reply With Quote
  #14  
Old 08-29-2006, 09:56 PM
GNDI's Avatar
GNDI GNDI is offline
 
Join Date: Jun 2005
Location: Denmark
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the teori, how do you do this for real whit freebsd 6.1?

my case:

I have a lovely server whit two nics. I want to "abuse" them both

The first nic should handle the normal www traffic (The outsite card)
The second nic should route to the DB server.

My OS is FreeBSD 6.1-RELEASE
www= Apache 2.2

The DB is Mysql 5.x

My IP-Addresses is 87.52.171.128/24 and the IP to the first nic is
87.52.171.131

How do I set this up to force the second nic only to get to the DB server
(Only one nic installed)

Other hardware to use for networking build is two swicthes One fare better
than the second, therefore I'll prefere to only use that one. One Cisco
router.

I have been reading a lot on this site
http://www.freebsd.org/doc/en_US.ISO...k-routing.html
but i didn't understand it :/ mayby I have been reading to little.

Please give me the exact scipting lines and setup (For dummies)
Reply With Quote
  #15  
Old 08-29-2006, 11:31 PM
DevilYellow DevilYellow is offline
 
Join Date: Nov 2004
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will soon have 2 boxes each with 2 Gbit NIC's. On the first box I bonded both NIC's together. The new box could be set up almost the same. I was thinking of connecting the DB server directly to the Webserver accross one of these NIC's and not do the bonding - but then I'd have to maintain the DB server thru the Webserver.

Thoughts?

Surely 2 bonded Gbit NIC's will have no problem talking to each other thru a Switch. The Firewall would block all traffic directly to the DB box and I would VPN in to maintain it.
Reply With Quote
  #16  
Old 05-31-2007, 08:57 PM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,

Thanks for this idea, I have never thought about this before.

We have two webservers and one DB server here. How could we implement this idea here, since in your example you had only one webserver?

I though about adding two network cards on each server, i.e. on each webserver we would have one NIC connected to the Internet and the other NIC connected to the DB server, and on the DB server two NICs, one connected to each webserver. Would this work?

Thanks,
Gabriel.
Reply With Quote
  #17  
Old 05-31-2007, 10:24 PM
alexi alexi is offline
 
Join Date: Feb 2002
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would work but I'm not sure I would do it that way. The DB server would have to have 2 ip addresses that would make configuring things a lot tougher.
What I would do is put in a gigabit switch and run 1 cable to the the database server and each web server. If your database server had dual nics you could team them.
Do you need access to the database server from the web for administration? If so you could use a low speed nic for that
Reply With Quote
  #18  
Old 05-31-2007, 11:49 PM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Alexi,

Thanks a lot for your input. I think this idea is really better.
No, we do not access our DB server via www.

Cheers,
Gabriel
Reply With Quote
  #19  
Old 06-02-2007, 01:50 PM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any ideas on how to measure the NIC performance, i.e. how to create a chart similar to the one posted on this thread? I wish to analyse how is the traffic on our NIC right now.

Thanks,
Gabriel.
Reply With Quote
  #20  
Old 06-02-2007, 02:20 PM
alexi alexi is offline
 
Join Date: Feb 2002
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Google MRTG, it's free
Reply With Quote
  #21  
Old 06-19-2007, 10:13 PM
gabrielt gabrielt is offline
 
Join Date: Apr 2007
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the tip. I installed MRTG and also created some scripts for monitoring and the network traffic is around 10-12 Mbps right now on each web server and around 20 Mbps on MySQL server.

Thanks
Gabriel
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11907 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete