Jira (PUP-10227) Close the http connection prior to sleeping retry-after seconds

0 views
Skip to first unread message

Josh Cooper (JIRA)

unread,
Jan 8, 2020, 4:57:03 PM1/8/20
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Bug PUP-10227
Close the http connection prior to sleeping retry-after seconds
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/01/08 1:56 PM
Priority: Normal Normal
Reporter: Josh Cooper

To prevent thundering herds, puppetserver may return Retry-After and ask the agent to sleep. Until recently the agent would keep the connection open, until timeout occurs. To reduce resource usage on puppetserver, we should close the connection immediately.

The latest puppetserver version will return Connection: close, but agents may talk to older puppetservers versions which would benefit from this.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jan 8, 2020, 4:57:04 PM1/8/20
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jan 8, 2020, 5:14:04 PM1/8/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.y
Fix Version/s: PUP 6.4.z
Fix Version/s: PUP 5.5.z

Josh Cooper (JIRA)

unread,
Jan 13, 2020, 12:22:04 PM1/13/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10227
 
Re: Close the http connection prior to sleeping retry-after seconds

Also need to make sure that the pool doesn't cache the closed connection.

Josh Cooper (JIRA)

unread,
Jan 13, 2020, 7:07:03 PM1/13/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10227

Grooming Notes:

1. Target 5.5.x
2. Need to call Net::HTTP#finish in lib/puppet/network/http/connection.rb and lib/puppet/http/client.rb. The latter only exists in master
3. Don't add a closed connection back to the pool in lib/puppet/network/http/pool.rb. Should be able to call Net::HTTP#active? which is an alias for started?.

Josh Cooper (JIRA)

unread,
Jan 21, 2020, 12:46:03 PM1/21/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Coremunity Grooming Hopper

Melissa Stone (JIRA)

unread,
Jan 31, 2020, 11:46:05 AM1/31/20
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Jan 31, 2020, 11:46:05 AM1/31/20
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Sprint: Coremunity Hopper Platform Core KANBAN

Charlie Sharpsteen (JIRA)

unread,
Feb 6, 2020, 12:35:04 PM2/6/20
to puppe...@googlegroups.com
Charlie Sharpsteen commented on Bug PUP-10227
 
Re: Close the http connection prior to sleeping retry-after seconds

Sorry, missed this one in the sea of mail. Yes, this is a great change. Also, closing on the agent side seems like the best behavior going forward as the Connection: header was removed from HTTP/2.

Josh Cooper (JIRA)

unread,
Feb 10, 2020, 12:25:04 PM2/10/20
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Feb 10, 2020, 12:26:04 PM2/10/20
to puppe...@googlegroups.com

Luchian Nemes (JIRA)

unread,
Feb 13, 2020, 9:23:04 AM2/13/20
to puppe...@googlegroups.com
Luchian Nemes updated an issue
 
Change By: Luchian Nemes
Fix Version/s: PUP 6.y
Fix Version/s: PUP 6.13.0

Melissa Stone (JIRA)

unread,
Feb 13, 2020, 12:38:04 PM2/13/20
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Release Notes Summary: When puppetserver returns a 429 or 503 to an agent when the agent tries to make an http request, the agent run will sleep and then retry the connection after. Previously, the agent kept the http connection open during the sleep. We now close the connection prior to the sleep to reduce the resource load on the puppetserver.
Release Notes: Enhancement

Josh Cooper (JIRA)

unread,
Feb 13, 2020, 7:12:04 PM2/13/20
to puppe...@googlegroups.com

Kate Medred (JIRA)

unread,
Feb 18, 2020, 12:06:05 PM2/18/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages