Answers: <p>hmmm, tuff one.  dont think it's possible do do this <em>directly</em></p>
  <p>counter question, why do you wish to limit traffic ?  If you could do this, say through a network config of some kind, it owuld negatively impact build time.</p>
  <p>From experience things that have an impact on traffic between agent and sever :</p>
  <ul>
  <li>Artifacts: if you are storing artifacts within your builds they will be stored on the server. So at these points in your build process you will upload them from the agent to the server and depending on artifact size it will generate traffic.</li>
  <li>Sync: Depending on what source control you use (if any) and how you use it it's possible that the sync to occur on the master and then transfered over to the agent.  You can probably change this so the sync only occur on the agent which will pretty much eliminate this part of the traffic between them.</li>
  <li>Logs: all logs generated on the your jobs will be transfered back to the server.  Though to max out a connection here you'dhave to generate a whole lot of it !</li>
  </ul>
  <p>It's posible some plugins can generate their own traffic.  Without knowing more on your tasks it's difficult to go further.</p>
  <p>As to the actual question my first reflex here would be to look for ways to achieve this through a firewall or some other network system to throttle traffic.  Some will allow to target a specific application in addition to source/target IPs in their rules.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-04-21T13:26:17.347Z
Answers: Yes, we did this thru on the network. I had to do this because our network folks said we weren't being fair to others using the network. :(
Answers: Eric C
Answers: CC BY-SA 4.0
Answers: 2021-04-16T02:13:46.183Z
Answers: 2021-04-16T02:13:46.183Z
Answers: Newtopian
Answers: <p>It's a strange question coming from network as they control it but then again... network folks ;).<br />
  I'm assuming you have a Jenkins master node and a separate Jenkins slave node.
  For a quick blunt fix you could take a look at <a href="https://github.com/magnific0/wondershaper" rel="nofollow noreferrer">https://github.com/magnific0/wondershaper</a> and run it on the remote slave node. It will slow things down considerably when there's stuff to be pushed/pulled over the network but at least you are complying to their request.
  Another option is true &quot;Traffic Shaping&quot; but it's a hassle to set up whereas wondershaper is a quick but less elegant fix. Perhaps you could enable wondershaper at the start of the Jenkins job and disable it afterwards or you could add another nic and create dedicated routes between master/slave so that network card is used for jenkins communication and run wondershaper on that nic alone leaving normal/default network traffic at max speed.</p>
  <p>Last option is to stake your ground and respond to the network people &quot;You guys run the network, can't you configure appropriate Traffic Shaping on the router/firewall?&quot;</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-04-24T13:59:15.350Z
Answers: 2021-04-24T13:59:15.350Z
Answers: wowbagger
Body: <p>I am trying to find a way to throttle the thruput on the request of our Network folks. They want me to not exceed 5.5Mb/sec. Is there a way to do this within Jenkins. Looking at the config files under</p>
  <p>Manage Jenkins &gt; Nodes &gt; &quot;Node name&quot;</p>
  <p>I couldn't find anything that would do this.</p>
  <p>Also, googling for a solution only resulted in simultaneous build info.</p>
  <p>Thanks</p>
  
Comments: CC BY-SA 4.0
Comments: 2021-04-24T20:45:24.383Z
Comments: Not asked, what is source source control and what are you building?
Comments: Ian W
Tags: <jenkins><networking>
Title: Limit throughput between Jenkins and Jenkins Agent
UserDisplayName: Eric C
ThreadText: # Limit throughput between Jenkins and Jenkins Agent
  
  (Asked by: username_0 on 2021-04-14)
  
  I am trying to find a way to throttle the thruput on the request of our Network folks. They want me to not exceed 5.5Mb/sec. Is there a way to do this within Jenkins. Looking at the config files under
  
  Manage Jenkins > Nodes > "Node name"
  
  I couldn't find anything that would do this.
  
  Also, googling for a solution only resulted in simultaneous build info.
  
  Thanks
  
  **Tags:** jenkins, networking
  
  > **Comments:**
  > **username_1**: Not asked, what is source source control and what are you building?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-04-16. Score: 1 | Accepted answer
  
  hmmm, tuff one. dont think it's possible do do this *directly*
  
  counter question, why do you wish to limit traffic ? If you could do this, say through a network config of some kind, it owuld negatively impact build time.
  
  From experience things that have an impact on traffic between agent and sever :
  
  * Artifacts: if you are storing artifacts within your builds they will be stored on the server. So at these points in your build process you will upload them from the agent to the server and depending on artifact size it will generate traffic.
  * Sync: Depending on what source control you use (if any) and how you use it it's possible that the sync to occur on the master and then transfered over to the agent. You can probably change this so the sync only occur on the agent which will pretty much eliminate this part of the traffic between them.
  * Logs: all logs generated on the your jobs will be transfered back to the server. Though to max out a connection here you'dhave to generate a whole lot of it !
  
  It's posible some plugins can generate their own traffic. Without knowing more on your tasks it's difficult to go further.
  
  As to the actual question my first reflex here would be to look for ways to achieve this through a firewall or some other network system to throttle traffic. Some will allow to target a specific application in addition to source/target IPs in their rules.
  
  > **Comments:**
  > **username_0**: Yes, we did this thru on the network. I had to do this because our network folks said we weren't being fair to others using the network. :(  
  
  ---
  
  ### Answer by username_3 on 2021-04-24. Score: 1
  
  It's a strange question coming from network as they control it but then again... network folks ;).  
  I'm assuming you have a Jenkins master node and a separate Jenkins slave node.
  For a quick blunt fix you could take a look at <https://github.com/magnific0/wondershaper> and run it on the remote slave node. It will slow things down considerably when there's stuff to be pushed/pulled over the network but at least you are complying to their request.
  Another option is true "Traffic Shaping" but it's a hassle to set up whereas wondershaper is a quick but less elegant fix. Perhaps you could enable wondershaper at the start of the Jenkins job and disable it afterwards or you could add another nic and create dedicated routes between master/slave so that network card is used for jenkins communication and run wondershaper on that nic alone leaving normal/default network traffic at max speed.
  
  Last option is to stake your ground and respond to the network people "You guys run the network, can't you configure appropriate Traffic Shaping on the router/firewall?"
  
  
  ---
  
  