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

Agent service registry slowdown #1265

Closed
spheromak opened this issue Sep 30, 2015 · 6 comments
Closed

Agent service registry slowdown #1265

spheromak opened this issue Sep 30, 2015 · 6 comments

Comments

@spheromak
Copy link

Per the conversation on the mailing list here: https://groups.google.com/forum/#!searchin/consul-tool/thousands$20of$20services/consul-tool/vPAhS1EhABM/_SPAIXuMFDQJ

There is a slowdown due to how the gent loops over all services and the catalog returned from the server that completes in O(N^2). After talking with @slackpad at HashiConf we think that we can improve on this fairly simply with an index on the server result.

@spheromak
Copy link
Author

@slackpad did you do anything with this since hashiconf ?

@armon
Copy link
Member

armon commented Oct 13, 2015

@spheromak I think #1296 is a partial fix at least. Do those services have checks associated, or are there just 10K services without checks?

@slackpad
Copy link
Contributor

Hi @spheromak sorry for the delay on this, and thanks @armon. Your change in #1296 looks good but iirc there were no health checks for these services. Looking at the code I'm surprised there's not an n^2 loop over services so I'm not sure this alone will fix it.

@spheromak
Copy link
Author

No agent checks. We were planning on doing http callbacks for service
status.

On Mon, Oct 12, 2015 at 9:15 PM James Phillips notifications@github.com
wrote:

Hi @spheromak https://github.com/spheromak sorry for the delay on this,
and thanks @armon https://github.com/armon. Your change in #1296
#1296 looks good but iirc there
were no health checks for these services. Looking at the code I'm surprised
there's not an n^2 loop over services so I'm not sure this alone will fix
it.


Reply to this email directly or view it on GitHub
#1265 (comment).

@spheromak
Copy link
Author

This may have been causing the slowdown. I am traveling this week but will
try to get a test run with the patch
On Tue, Oct 13, 2015 at 5:29 AM Jesse Nelson spheromak@gmail.com wrote:

No agent checks. We were planning on doing http callbacks for service
status.

On Mon, Oct 12, 2015 at 9:15 PM James Phillips notifications@github.com
wrote:

Hi @spheromak https://github.com/spheromak sorry for the delay on
this, and thanks @armon https://github.com/armon. Your change in #1296
#1296 looks good but iirc
there were no health checks for these services. Looking at the code I'm
surprised there's not an n^2 loop over services so I'm not sure this alone
will fix it.


Reply to this email directly or view it on GitHub
#1265 (comment).

slackpad added a commit that referenced this issue Oct 26, 2015
@slackpad
Copy link
Contributor

#1296 has been working well - closing this out.

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

No branches or pull requests

3 participants