Replies: 8 comments 6 replies
-
from what i believe, this is something to do with hotrod/infinispan cluster, but how to tweak infinispan for keycloak?? |
Beta Was this translation helpful? Give feedback.
-
@pedroigor , @hmlnarik , @mhajas @martin-kanis , @thomasdarimont , can any one suggest how can i get past this issue? |
Beta Was this translation helpful? Give feedback.
-
@kkcmadhu Could you check, if you accidentally create a completely new user session for repeated token requests? You could verify that by looking at the sessions tab for the client and user in the (old) admin-console. Since you mention that you are using basic auth to obtain tokens, is it possible that you are using this as some means to authenticate users for a legacy application? If you don't use the token at all you could try to disable the refresh token generation for the client in the client configuration. |
Beta Was this translation helpful? Give feedback.
-
@kkcmadhu Are you using Keycloak 19 or the current |
Beta Was this translation helpful? Give feedback.
-
Tag 19.0.3
Sent from Yahoo Mail on Android
On Thu, 27 Oct 2022 at 7:38 pm, Michal ***@***.***> wrote:
@kkcmadhu Are you using Keycloak 19 or the current main branch?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@kkcmadhu I tried to reproduce this, however, I am not able to reproduce any significant performance drop. I was running it locally. I run Keycloak using:
and an Infinispan server using:
then I executed the following command in a loop:
Currently, I am at 8000th iteration and it still finishes in around 100ms. In the Infinispan console, I can see there are 20000 entries. Can you please share more details on how you tested it? |
Beta Was this translation helpful? Give feedback.
-
@mhajas i tried with 12.1.x that too is not too different , this time around the cache entties got created automatically.. at the moment i have about 10k session after 15 mins run and i see the latency increasing with time.. |
Beta Was this translation helpful? Give feedback.
-
ok if use all hot rod (like your test ) i.e --storate=hotrod ,instead of combination of hotrod and postgres, i see some improvment in perforamnce, but the pattern is still same, with time, the token generation time increases.. the numbers are not in 100ms range as in your test.. may be i will try with keycloak from the main branch too and get back.. |
Beta Was this translation helpful? Give feedback.
-
i am using external cache setup hotrod,and my user-session are stored in external infinispan server.
I just have 1 realm, 1 user, and try to repeatedly get tokens for this user using basic auth. with time i see that the time for obtainin new token increases..
If i clear the cache (infinispan user-sessions cache) from the infinispan console , the token generation time comes down, and it increases again as the number of entries(session) in the cache are added..
Here is a jmeter graph for the same
the dips are whenever i reset/clear the cache..
Plese note, In the infinispan console, performing 'clear index' too helps a bit(but not as good as 'clear all entries'). 'Rebuild index' , do not have much impact..
if i donot clear cache , over time the peformance degrades drastically
Beta Was this translation helpful? Give feedback.
All reactions