[keycloak-user] Performance lag in client role creation and retrieval

Stian Thorgersen sthorger at redhat.com
Wed Dec 14 00:51:38 EST 2016


As Marek commented on the issue can you please create another JIRA for your
issues on 2.4?

On 8 December 2016 at 07:31, Padmaka Wijaygoonawardena <teknodjs at gmail.com>
wrote:

> Hi,
>
> I've tried Keycloak 2.4.0.Final with the same setup as above regarding the
> performance issue. For creating a role and assign role there is a good
> performance improvement.
>
> However, after the 2.4.0 upgrade, for the 'get client role by role name'
> endpoint it is taking around 15s on average. Earlier there wasn't this much
> of a performance lag. In the database I have around 30000 client roles and
> around 10000 roles per client.
>
> Please note that I have a MySQL DB, and a two node cluster.
>
> Any advice or fix would be highly appreciated. Thanks in advance.
>
> I have commented on the related ticket as well [1]
>
> [1] - https://issues.jboss.org/browse/KEYCLOAK-3863
>
> On Fri, Nov 4, 2016 at 3:48 PM, Padmaka Wijaygoonawardena <
> teknodjs at gmail.com> wrote:
>
>> Hi,
>>
>> Thanks for replying I created a ticket here [1].
>>
>> Cheers,
>> Padmaka
>>
>> [1] - https://issues.jboss.org/browse/KEYCLOAK-3863
>>
>> On Fri, Nov 4, 2016 at 11:01 AM, Stian Thorgersen <sthorger at redhat.com>
>> wrote:
>>
>>> We're actually currently looking at some issues around this. Please
>>> create a JIRA and we'll make sure your case is checked as well.
>>>
>>> Hopefully this will be solved in the upcoming 2.4 release.
>>>
>>> On 3 November 2016 at 12:16, Padmaka Wijaygoonawardena <
>>> teknodjs at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm currently using Keycloak 2.2.1 with a MySQL database. The setup I'm
>>>> using has 2 Keycloak nodes and around 4000 client roles for one client.
>>>> the
>>>> process I go through for adding is as follows:
>>>>
>>>>
>>>>    1. GET call to check whether the role already exists. (takes around
>>>>    2000ms)
>>>>    2. POST call to create the new client role. (takes around 10000ms)
>>>>    3. GET call to get the newly created client role(Since the create
>>>> role
>>>>    call doesn't send the full client role in the response body). (takes
>>>> around
>>>>    10000ms)
>>>>
>>>> The Keycloak version I used earlier was 1.9.0 with that version this
>>>> process worked fine with one call taking around 700ms on average.
>>>>
>>>> So as shown above this is a huge performance lag. With further
>>>> investigation I found the following points
>>>>
>>>>
>>>>    1. When using only one Keycloak node this problem doesn't appear.
>>>>    Therefore it should be some issue with infinispan cache.
>>>>    2. When I remove the get calls and only send the create calls then
>>>> the
>>>>    calls return in 2000ms in average.
>>>>    3. This lag only appears when executing a get role call soon after
>>>>    creating a client role.
>>>>
>>>> I double checked the changes for 2.3.0 [1] since there is nothing said
>>>> about cache or related issues I raised this issue.
>>>>
>>>> Any advice or fix would be highly appreciated. Thanks in advance.
>>>>
>>>> [1] - http://blog.keycloak.org/2016/10/keycloak-230cr1-released.html
>>>>
>>>> Cheers,
>>>> Padmaka.
>>>> _______________________________________________
>>>> keycloak-user mailing list
>>>> keycloak-user at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>>
>>>
>>>
>>
>


More information about the keycloak-user mailing list