[proposal] perf(basic-auth-v2) introduces basic-auth-v2 plugin with better performance#5914
[proposal] perf(basic-auth-v2) introduces basic-auth-v2 plugin with better performance#5914Abhishekvrshny wants to merge 1 commit intoKong:masterfrom
Conversation
…rmance The original basic-auth plugin has id as the primary key, with a secondary index on username. While this works well with postgres, there are performance issues with cassandra as lookups always happen on username and secondary indexes on cassandra are inefficient. A new plugin is introduced as changing the primary key in cassandra is non-trivial and hence updating the existing plugin is not possible. This plugin makes username as the partition key and id as the clustering in cassandra. In case of postgres, both form composite primary key. Signed-off-by: Abhishek Varshney <abhishek.varshney@razorpay.com>
326909d to
55011eb
Compare
|
Hello, thanks for your contribution.
While I agree in that it is not-trivial, I think updating the existing plugin is perfectly possible. Changes similar to the one you are mentioning on this PR have already been done to Kong entities in the past. This kind of transition is done in the migration segments. Recently, for example, we had to add a new core entity for several tables. This meant changing the pagination of several key entities. You can see the relevant functions here: They were used to re-partition several tables in the corresponding migration: It stands to reason that a similar approach could be taken here. It is not a trivial one, for sure, but it is doable. I think in the long run it would be less work than maintaining two separate basic-auth plugins. |
|
Abhishek Varshney seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Cassandra is deprecated as a supported data-store. Furthermore, Hybrid mode is our recommended mode of operation which doesn't have this problem. |
|
Stop this email chain please
This is external company
Mayank Gupta<https://www.linkedin.com/in/mayankgupta/>|Director Product Marketing, Nutanix Cloud Manager | Nutanix, San Jose, CA
From: Harry ***@***.***>
Date: Tuesday, October 25, 2022 at 2:24 PM
To: Kong/kong ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [Kong/kong] [proposal] perf(basic-auth-v2) introduces basic-auth-v2 plugin with better performance (#5914)
Cassandra is deprecated as a supported data-store. Furthermore, Hybrid mode is our recommended mode of operation which doesn't have this problem.
Our guidance is to have a custom plugin to get around these limitations.
Closing this PR for now. Please re-open if needed.
—
Reply to this email directly, view it on GitHub [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Kong_kong_pull_5914-23issuecomment-2D1291160788&d=DwMCaQ&c=s883GpUCOChKOHiocYtGcg&r=hnPwr0jWCPEq3KK6hs0uz1B7pY0iKgb4C9BMfYIgdgU&m=Ara65KQCkwIYkV6oSVH0-s3O2lvIAaILPk0_8B_GdyqcW3m2QXJWENLN5IpdchST&s=d-ItzFi7xYMGHMAAEZaEl8FYiyOpCNgbkSggWIE11Kc&e=>, or unsubscribe [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAFSDF7BMHM7PRIOLN7JQF3WFBF2HANCNFSM4NDBI3QA&d=DwMCaQ&c=s883GpUCOChKOHiocYtGcg&r=hnPwr0jWCPEq3KK6hs0uz1B7pY0iKgb4C9BMfYIgdgU&m=Ara65KQCkwIYkV6oSVH0-s3O2lvIAaILPk0_8B_GdyqcW3m2QXJWENLN5IpdchST&s=ZjP4xoKkx82M3qw7xvxGcRPCdt6wRCu2eBSro62AiAs&e=>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Summary
The original
basic-authplugin hasidas the primary key, with asecondary index on
username. While this works well with postgres,there are performance issues with cassandra as lookups always happen
on
usernameand secondary indexes on cassandra are inefficient.A new plugin is introduced as changing the primary key in cassandra
is non-trivial and hence updating the existing plugin is not possible.
This plugin makes
usernameas the partition key andidas theclustering in cassandra. In case of postgres, both form composite
primary key.
Signed-off-by: Abhishek Varshney abhishek.varshney@razorpay.com
Issues resolved
https://discuss.konghq.com/t/primary-key-for-cassandra-in-basic-auth-plugin/6169