-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support Token Aware Routing #54
Comments
Unfortunately there is no way to specify a load balancing policy (issue #21). I think this is the main drawback of this driver. Regarding async queries, the driver uses the openresty's cosocket api, so the calls do not block nginx, although they are synchronous. Async queries would be an advantage if you want to fire multiple queries in parallel for a single request. There is another open issue for supporting that: #3. It would be nice if the driver could automatically split one WHERE IN query into multiple selects (one query for each node), but I would go for that only if there is an available implementation of this feature in one of datastax's official drivers. Do you know if any other driver does that? |
What about doing something like Batch where the select queries are done within coroutine.wrap? At this point I think there may be some socket problems but I think it may be possible? Also, I know there is a patch coming to use cosockets across lightthreads but I don't know when it will be merged. |
Running queries inside coroutines would not help because the driver reads the query results synchronously. Nginx is not blocked because of cosocket api's magic. The easiest solution is to fix issue #3, allowing several queries / streams on the same connection. If you are doing a single query for each request, you don't need to worry about that. |
I'm currently experiencing a serious performance issue with the coordinator node becoming unresponsive due to a huge influx of WHERE IN() queries.
My current approach is to break the WHERE IN query into multiple selects, however, I'd be able to
As an additional question, do you have any strategies for dealing with async queries within openresty? It seems like there is a pretty serious performance cliff without the ability to fire multiple async queries.
The text was updated successfully, but these errors were encountered: