Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 13, 2011 5:05 am 
Offline
Senior Member

Joined: Sat Nov 13, 2010 3:05 am
Posts: 91
Website: http://www.graq.co.uk
I have a number of web nodes that only serve data across private IP. Is there a way I can measure the traffic on port 80 between specific nodes.

The aim is measure how much each node uses out of the pooled public bandwidth.


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 5:10 am 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
Well, the graphs in the manager show private traffic on its own (and combined with everything else), so if you look at each web node's graphs...

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 8:29 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Add iptables rules with no actions:

Code:
iptables --append INPUT --destination 192.0.2.0/24 --destination-port 80
iptables --append OUTPUT --source 192.0.2.0/24 --source-port 80


... will catch all traffic involving the local machine talking to web servers in 192.0.2.0/24. Adjust address and ports and --destination-port vs. --source-port accordingly.

Then, "iptables -L -n -v -x" will show the cumulative packet and byte counts for that rule. Sic something like munin on it and you're in the gravy boat.

EDIT: And indeed, if it's only the bandwidth quota you care about, the graphs and counters on the Linode manager already account for this.


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 8:58 am 
Offline
Senior Member

Joined: Sat Nov 13, 2010 3:05 am
Posts: 91
Website: http://www.graq.co.uk
hoopycat wrote:
Add iptables rules with no actions:

Code:
iptables --append INPUT --destination 192.0.2.0/24 --destination-port 80
iptables --append OUTPUT --source 192.0.2.0/24 --source-port 80


... will catch all traffic involving the local machine talking to web servers in 192.0.2.0/24. Adjust address and ports and --destination-port vs. --source-port accordingly.

Then, "iptables -L -n -v -x" will show the cumulative packet and byte counts for that rule. Sic something like munin on it and you're in the gravy boat.

EDIT: And indeed, if it's only the bandwidth quota you care about, the graphs and counters on the Linode manager already account for this.

For example, linode panel graph shows private out average of 362.23 kb/s for the last 30 days. This is about 120GB. However, I can't tell from that how much of the data ended up leaving the private network. I appreciate that (given my calculation is correct) this is within a 512 node. But the busy period is expected in about 6 weeks.

I'm using ufw to manage my iptables. Presumably ufw will barf any rules added directly via iptables?


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 9:41 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
I thought that traffic across the private network did not count against your bandwidth allotment. Also, bandwidth is pooled across all your nodes, so if you have 2 512 nodes, you actually have 400GB of bandwidth total, not 200GB for each node.

If my understanding is correct, the servers talking on the private network only won't ever count against your bandwidth allotment.


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 10:22 am 
Offline
Senior Member

Joined: Sat Nov 13, 2010 3:05 am
Posts: 91
Website: http://www.graq.co.uk
waldo wrote:
I thought that traffic across the private network did not count against your bandwidth allotment. Also, bandwidth is pooled across all your nodes, so if you have 2 512 nodes, you actually have 400GB of bandwidth total, not 200GB for each node.

If my understanding is correct, the servers talking on the private network only won't ever count against your bandwidth allotment.
I have two public facing nodes with failover IP that route traffic onto backend nodes over private network. I want to know how much each backend node contributes to the overall public bandwidth usage.


Top
   
 Post subject:
PostPosted: Thu Oct 13, 2011 10:24 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
You could use ufw to set an allow rule for the traffic you want to log; I think ufw will pretty-print the iptables counters with one of the status commands, too.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group