-
Notifications
You must be signed in to change notification settings - Fork 49
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
Resolve TODO for secondary DB #705
Comments
Hi @c0c0n3 @chicco785 i have check for this issue about adding not critical check if a secondary db is configured and i found these comments related this issue |
Hi @Necravisaketi, sorry for getting back to you sooo late on this. But as they say, better late than never :-) Quantum Leap is designed to work with different DB backends simultaneously. At the moment we only support two DBs, namely Crate and Timescale, but we could add more in the future. For any given API call requiring a DB, QL selects a DB backend depending on the tenant (FIWARE service header) the call is for. The algo that does this tenant-to-DB routing is:
The map The YAML configuration file specifies what backend to use for which tenant as well as the default backend to use for any other tenant not explicitly mentioned in the file. Here's an example YAML configuration: tenants:
t1:
backend: Timescale
t2:
backend: Crate
t3:
backend: Timescale
default-backend: Crate With this configuration, any NGSI entity coming in for tenant |
Now let's talk about "secondary DB". I think this is a bit of a misnomer, since you could be in a situation where half of your tenants use Crate and the other half Timescale. What's the meaning of "secondary" in this case? So let's just drop that term and talk about configured DBs. So if you want a sane implementation of that health check, you should first determine the set of configured DBs and then ping each DB in the set. How to figure out that set though? Well, the set is given by taking the values in |
Resolve TODO for secondary DB at:
ngsi-timeseries-api/src/reporter/health.py
Line 91 in af8877c
The text was updated successfully, but these errors were encountered: