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

Avoid querying local dc with prepared query #3250

Open
hagay3 opened this issue Jul 10, 2017 · 6 comments
Open

Avoid querying local dc with prepared query #3250

hagay3 opened this issue Jul 10, 2017 · 6 comments
Assignees
Labels
theme/federation-usability Anything related to Federation theme/prepared-query Anything related to prepared queries type/enhancement Proposed improvement or new feature

Comments

@hagay3
Copy link

hagay3 commented Jul 10, 2017

Prepared query is a great mechanism.

It will be very likely that the DC list will follow the precedence of which DC to query.
Right now the local DC you execute the query from has an higher priority than the DC list inside the prepared query.
The suggestion is to add "skip the local datacenter" attribute with a true/false value to prepared query (json format).
https://www.consul.io/api/query.html#sample-payload

This request discussed also in consul google group, @slackpad suggested to create a feature request.
https://groups.google.com/forum/#!topic/consul-tool/O-JWve5uN0E

@slackpad slackpad added type/enhancement Proposed improvement or new feature theme/federation-usability Anything related to Federation labels Aug 10, 2017
@blop
Copy link

blop commented May 1, 2018

+1

I'd rather have a global query that I can execute everywhere, but which defines the best datacenter order in itself, not based on the local dc used.

@hanshasselberg
Copy link
Member

Hello @hagay3, is this still something you are interested in adding? Just stumbled over your PR.

@hanshasselberg hanshasselberg self-assigned this Dec 12, 2019
@hagay3
Copy link
Author

hagay3 commented Dec 15, 2019

Still can be helpful @i0rek

@hanshasselberg
Copy link
Member

hanshasselberg commented Jan 6, 2020

I got confused for a second and also answered on the PR. Would you or @blop be willing to provide a PR (or rebase the exsting one)?

I am still thinking about @pierresouchay's #4092 (comment). Right now I am leaning towards 2 states: true and false just because it is the simpler feature. The 3rd state fallback could be added later if it turns out to be needed.

Lets continue the discussion here.
Thanks!

@hanshasselberg hanshasselberg added the waiting-reply Waiting on response from Original Poster or another individual in the thread label Jan 6, 2020
@stale stale bot removed the waiting-reply Waiting on response from Original Poster or another individual in the thread label Jan 6, 2020
@hanshasselberg hanshasselberg added the waiting-reply Waiting on response from Original Poster or another individual in the thread label Jan 6, 2020
@ghost
Copy link

ghost commented Jan 26, 2020

Hey there,

This issue has been automatically closed because there hasn't been any activity for at least 20 days.

If you are still experiencing problems, or still have questions, feel free to open a new one 👍.

@ghost ghost closed this as completed Jan 26, 2020
@ghost ghost removed waiting-reply Waiting on response from Original Poster or another individual in the thread labels Jan 26, 2020
@hanshasselberg hanshasselberg added the waiting-reply Waiting on response from Original Poster or another individual in the thread label Jan 27, 2020
@jkirschner-hashicorp jkirschner-hashicorp added the theme/prepared-query Anything related to prepared queries label Sep 7, 2021
mougams added a commit to mougams/consul that referenced this issue May 23, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.

This patch solves issue described in hashicorp#3250
mougams added a commit to criteo-forks/consul that referenced this issue May 23, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue May 31, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jun 1, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to criteo-forks/consul that referenced this issue Jun 1, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to criteo-forks/consul that referenced this issue Jun 1, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jun 7, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jun 8, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jun 8, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to criteo-forks/consul that referenced this issue Jun 9, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jun 9, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jun 9, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jul 11, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to mougams/consul that referenced this issue Jul 11, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mougams added a commit to criteo-forks/consul that referenced this issue Jul 11, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
@mbrulatout
Copy link

Hello, can we get an update on this ? This has been staled for years.

@github-actions github-actions bot removed the waiting-reply Waiting on response from Original Poster or another individual in the thread label Dec 13, 2023
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Dec 13, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Dec 28, 2023
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Apr 23, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue May 6, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jun 19, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jun 19, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jun 19, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Oct 7, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Oct 8, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Oct 9, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Oct 9, 2024
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jan 13, 2025
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jan 13, 2025
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
mbrulatout pushed a commit to criteo-forks/consul that referenced this issue Jan 23, 2025
- Add option SkipLocalDatacenter in Failover section, defaulted to false,
which enable the possibility to never execute the query in the local
datacenter when set to true.
- Also when the option is enabled, if the local datacenter is listed in the
failover datacenters, execute the query locally instead of triggering remotely.
- Add more tests on prepared query

This patch solves issue described in hashicorp#3250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/federation-usability Anything related to Federation theme/prepared-query Anything related to prepared queries type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

6 participants