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

HTTP Connection Limits #6559

Closed
jwilder opened this issue May 5, 2016 · 2 comments · Fixed by #6601
Closed

HTTP Connection Limits #6559

jwilder opened this issue May 5, 2016 · 2 comments · Fixed by #6601

Comments

@jwilder
Copy link
Contributor

jwilder commented May 5, 2016

Feature Request

The HTTP input currently allows an unbounded number of connections and relies on the client to be well-behaved. This can cause problems in the case where the client is not well-behaved or the system is overloaded and slow to process connections.

For example, a client that does not close connections correctly can cause the server to hold onto buffers for the connection for long periods of time and potentially OOM the process. Similarly, if the system has saturated CPU or Disks, connections can pile up waiting to be processed

The database should have config options to mitigate these kinds of issue:

  • Max Connections - A hard limit where we immediately return an error and close new connections when the limit is exceeded.
  • Max Concurrent Writes - A hard limit where we immediately return an error and close new /write connections when the limit is exceeded.
  • Max Concurrent Queries - A hard limit where we immediately return an error and close new /query connections when the limit is exceeded.

The default value for these options should be 0 (disabled) for backwards compatibility.

@jwilder jwilder added this to the 1.0.0 milestone May 5, 2016
@jsternberg jsternberg self-assigned this May 9, 2016
@jsternberg
Copy link
Contributor

@jwilder we already have maximum concurrent queries, but I can add maximum concurrent writers and concurrent connections.

Also, should the overall connection limit apply to any HTTP connection? If so, does that include the debug endpoints and the /status endpoint?

@jwilder
Copy link
Contributor Author

jwilder commented May 10, 2016

@jsternberg The connection limits should be separate for write and query. Can probably scrap the max connections limit if they are separated.

jsternberg added a commit that referenced this issue May 11, 2016
The http connection limit is for any HTTP operation and is independent
of the other connection limits. It should be set to a higher value than
the query limit or the write limit. The difference between this and the
other connection limits is it will close out the connection immediately
without any further processing.

A max concurrent write limit has been added. This will prevent writes to
the underlying store if the number of writers exceeds the threshold.

Also removes some unused config options from the cluster config.

Fixes #6559.
jsternberg added a commit that referenced this issue May 12, 2016
The http connection limit is for any HTTP operation and is independent
of the other connection limits. It should be set to a higher value than
the query limit. The difference between this and the query limit is it
will close out the connection immediately without any further
processing.

This is the equivalent of the `max_connections` option in PostgreSQL.

Also removes some unused config options from the cluster config.

Fixes #6559.
jsternberg added a commit that referenced this issue May 12, 2016
The http connection limit is for any HTTP operation and is independent
of the other connection limits. It should be set to a higher value than
the query limit. The difference between this and the query limit is it
will close out the connection immediately without any further
processing.

This is the equivalent of the `max_connections` option in PostgreSQL.

Also removes some unused config options from the cluster config.

Fixes #6559.
@timhallinflux timhallinflux modified the milestones: 1.0.0, 1.0.0 beta Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants