Comments (17)
I am willing to contribute on this functionality and some members of my team may be interested as well. If the team agrees to support the feature let me know what is the plan.
from external-scaler-azure-cosmos-db.
You can do that as part of KEDA core - http://keda.sh/
from external-scaler-azure-cosmos-db.
@tomkerkhove I will need to write similar an external scaler similar to this right?
from external-scaler-azure-cosmos-db.
No, you can just use KEDA which supports both systems.
from external-scaler-azure-cosmos-db.
Does it support scaling based on cosmos db query? I don't see the scaler for that. Apologies if I am not understanding this correctly, new to KEDA.
from external-scaler-azure-cosmos-db.
Oh I misunderstood your original question - Sorry!
I though you wanted to read a custom query from MSSQL & MongoDB.
from external-scaler-azure-cosmos-db.
@ankitbko - The Cosmos DB scaler will work by monitoring the change-feed that is being (or will be) processed by the target application. From the Cosmos DB documentation, it does not look like we can have filtered change-feeds. The estimator documented here too does not support filtering through query.
It should not be possible to read the content of these change feeds in the scaler, applying the custom query and only mark the external event as 'active' if there are non-zero results after filtering. That would require taking over lease of these change feeds causing conflict with the lease taken by target application, and may result in missing events.
Let me know if you have any suggestion for enabling custom queries using an existing support in Cosmos DB.
from external-scaler-azure-cosmos-db.
What would be a good improvement, though, would be to call it the "Azure Cosmos DB Changefeed scaler" to emphasize this @JatinSanghvi
from external-scaler-azure-cosmos-db.
The original request is for the data plane for which I can see value as well, but that would rather be a different scenario/scaler
from external-scaler-azure-cosmos-db.
@tomkerkhove, I am unable to understand. I was taking about the data plane actually. Change feeds are the only way new changes to the Cosmos DB container can be processed and we expect all target application to use change feeds for change processing.
The number of change feeds cannot be scaled on demand; the number is same the count of underlying physical partitions of Cosmos DB container; the physical partitions depends on the storage size of container (and also provisioned throughput).
If there are multiple instances of processor apps running (may be because they were scaled out by KEDA), each of these instances will acquire lease on one or more of these feeds and start consuming the changes. This sets the max limit these app instances to the count of physical partitions in Cosmos DB container. The leases ensure that two different apps don't process the same data. But this also limits what the scaler can possibly do. For example, it can estimate the size of data pending for processing, but it cannot steal leases from the scaled-target apps to read data, say to apply filter through custom query.
Let me know if I misunderstood your comment.
from external-scaler-azure-cosmos-db.
Changefeed is indeed for data processing of changes, but there is more than that.
If somebody would want to scale based on the # of docs returned from a query that is a valid scenario as well (which is the request here) but not the focus of this scaler.
Hence why I suggested to make it explicit that it's a Azure Cosmos Db Changefeed Scaler
from external-scaler-azure-cosmos-db.
Yes the ask here was to run a query on Cosmos and scale based on returned resultset similar to below image. Will this feature be added to this scaler (as its named cosmosdb scaler) or should we have another created for handling that scenario?
from external-scaler-azure-cosmos-db.
It shoulds, the question is, will it be the scaler or another one.
That's why the name of this one should be very explicit about it @JatinSanghvi @pragnagopa
from external-scaler-azure-cosmos-db.
The ask here is specifically to scale the Cosmos DB container listeners based on result of running a query. As I explained in earlier comments, Cosmos DB does not support this as that will require the scaler to steal leases from the listener app. If this could be possible, @ankitbko's ask could be addressed by the current scaler itself.
from external-scaler-azure-cosmos-db.
The ask here is specifically to scale the Cosmos DB container listeners based on result of running a query. As I explained in earlier comments, Cosmos DB does not support this as that will require the scaler to steal leases from the listener app. If this could be possible, @ankitbko's ask could be addressed by the current scaler itself.
That is not correct, the ask above is fully unrelated to changefeed and leases. The ask is to scale based on the result of a query and a target value.
For example, what is the count of documents where field status
is Unprocessed
. The rest is up to the application.
So the bottom line here is, this scaler is only for changefeed and should be named accordingly
from external-scaler-azure-cosmos-db.
cc @lpapudippu @brettsam @ahmelsayed
In general I agree with the feature request.
@tomkerkhove - regarding
So the bottom line here is, this scaler is only for changefeed and should be named accordingly
If the team agrees to support this feature - we should extend current scaler implementation to support scaling bases on query . Let's not rename anything yet !
from external-scaler-azure-cosmos-db.
That's possible for sure, question is what the user experience would be then but I'm happy to wait as long as we don't have to "break" things.
from external-scaler-azure-cosmos-db.
Related Issues (20)
- Change image name to ghcr.io/kedacore/keda-external-scaler-azure-cosmos-db HOT 2
- Automatically keep dependencies up-to-date with Renovate
- Dependency Dashboard
- Provide Helm chart in KEDA registry
- CVE-2018-8292 (Medium) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 1
- CVE-2019-0820 (High) detected in system.text.regularexpressions.4.3.0.nupkg - autoclosed HOT 1
- CVE-2017-0256 (Medium) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 5
- CVE-2017-0247 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 3
- Provide README
- CVE-2017-0248 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 5
- CVE-2017-0249 (High) detected in system.net.http.4.3.0.nupkg - autoclosed HOT 5
- Provide integration tests to verify the scaler is working
- CVE-2022-1941 (High) detected in google.protobuf.3.21.5.nupkg - autoclosed HOT 3
- Support AAD Pod Identity HOT 2
- Update externalscaler.proto to follow protobuf style guidelines HOT 3
- Azure Functions Support
- List Cosmos DB external scaler on Artifact Hub HOT 1
- Provide release process guide
- Provide GitHub Action to publish official image on GHCR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from external-scaler-azure-cosmos-db.