Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP server connection idle timeout #251

Closed
wants to merge 1 commit into from

Conversation

guillaumeautran
Copy link
Contributor

Implement a idle TCP connection timeout for plain and pickle inputs.

@@ -54,6 +54,9 @@ listen_addr = "0.0.0.0:2003"
### Pickle Carbon ###
pickle_addr = "0.0.0.0:2013"

### Server socket idle timeout in seconds ###
server_socket_timeout = 3600
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to turn this on in the example config file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is wise to enable by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the position of this parameter is confusing. it's in between the pickle and amqp inputs, but it's actually a global option used by both pickle and plaintext carbon.
I think best would be to add the option to each input that uses it. e.g. to pickle and plain should have their own independent option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can split the config option, but since the plaintext and pickle inputs are both at the top level, both options should be at the top level as well (nesting these option might break older config file structure).

How about this
Option1:

## Inputs ##                                                                                                                                                                                                        
                                                                                                                                                                                                                    
### plaintext Carbon ###                                                                                                                                                                                            
listen_addr = "0.0.0.0:2003"                                                                                                                                                                                        
plaintext_socket_timeout = 3600                                                                                                                                                                                     
                                                                                                                                                                                                                    
### Pickle Carbon ###                                                                                                                                                                                               
pickle_addr = "0.0.0.0:2013"                                                                                                                                                                                        
pickle_socket_timeout = 3600                                                                                                                                                                                        
                                                                                                                                                                                                                    
### AMQP ###     
[amqp]    
...

Would that work?

Another option could be
Option2:

## Inputs ##                                                                                                                                                                                                        
                                                                                                                                                                                                                    
### plaintext Carbon ###                                                                                                                                                                                            
[plaintext]                                                                                                                                                                                                         
listen_addr = "0.0.0.0:2003"                                                                                                                                                                                        
socket_timeout = 3600                                                                                                                                                                                               
                                                                                                                                                                                                                    
### Pickle Carbon ###                                                                                                                                                                                               
[pickle]                                                                                                                                                                                                            
pickle_addr = "0.0.0.0:2013"                                                                                                                                                                                        
socket_timeout = 3600                                                                                                                                                                                               
                                                                                                                                                                                                                    
### AMQP ###    
[amqp]
...    

But I'm concerned that it changed the config format and that existing config will break without conversion.

Which one do you prefer?

@guillaumeautran guillaumeautran changed the title TCP server connection idle timeout (#250) TCP server connection idle timeout Jan 17, 2018
@guillaumeautran guillaumeautran mentioned this pull request Mar 28, 2018
@Dieterbe
Copy link
Contributor

Hi Guillaume sorry for the wait. I think this generally looks pretty good, but see my other comment.

Implement a idle TCP connection timeout for plain and pickle inputs.

Issue: grafana#250
Dieterbe added a commit that referenced this pull request Oct 22, 2018
Dieterbe added a commit that referenced this pull request Oct 22, 2018
Dieterbe added a commit that referenced this pull request Oct 23, 2018
@Dieterbe
Copy link
Contributor

this was implemented via #318

@Dieterbe Dieterbe closed this Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants