[keycloak-user] Keycloak in production. Use MongoDB or an RDBMS flavour?

Stian Thorgersen sthorger at redhat.com
Thu May 12 01:34:55 EDT 2016


One thing to add is that Mongo is not going to be supported in productized
version of Keycloak. At least not initially.

On 11 May 2016 at 17:43, Ton Swieb <ton at finalist.nl> wrote:

> Hi Marek,
>
> Thank you for your answer. So if I understand you correctly there are
> no plans to drop Mongo support in the near feature. Good to know.
>
> How many (concurrent) users did you need to use to see a performance
> difference between Mongo and MySQL?
>
> I assume the lack of transaction support in Mongo only becomes an
> issue with multi row/document transactions. Are multi row/document
> transactions used commonly in the Keycloak application or are most
> transactions limited to a single row/document?
>
> Regards, Ton
>
> 2016-05-11 9:45 GMT+02:00 Marek Posolda <mposolda at redhat.com>:
> > On 10/05/16 14:18, Ton Swieb wrote:
> >>
> >> Hi,
> >>
> >> I understand from the Keycloak documentation that both MongoDB and
> >> multiple flavours of RDBMS are supported, but I cannot find any
> >> recommendation whether to use MongoDB or an RDBMS by default.
> >>
> >> Which one is best suited for the Keycloak product?
> >> I am anticipating a user base of around 10000 users (mainly via
> >> Identity Brokering), will use offline tokens and use Keycloak as an
> >> Identity Broker for a SAML IdP. I am starting from a green field
> >> situation and do not have any restrictions on using a specific DB.
> >>
> >> I found a comment of Bill Birke on the Keycloak developer
> >> mailing-list,
> >> http://lists.jboss.org/pipermail/keycloak-dev/2015-July/004924.html,
> >> wishing he could drop Mongo and not seeing any advantages of using
> >> Mongo, but unfortunately the thread does not end with a
> >> conclusion/decision :-)
> >>
> >> What is the current position of the Keycloak team about using Mongo?
> >
> > We added Mongo support very early (somewhen around 2013) as an
> alternative
> > storage, which was at that time required by other project, which consumed
> > keycloak. The second project (Liveoak) is not under active development
> > anymore, but in the meantime, a lot of people started to use Keycloak
> with
> > Mongo and it seems that some of them already in production.
> >
> > The advantage of Mongo is good performance and scalability. At some
> point,
> > when I tested performance with bigger number of users, I saw much better
> > performance for Mongo then for MySQL. Also Mongo has support for DB
> > clustering and sharding (some RDBMS has it too AFAIK, but usually you
> need
> > to pay for them, which is not the case with Mongo ;)) . On the other
> hand,
> > biggest disadvantage of Mongo is missing support for transactions. So in
> > theory, if some error/bad situation happens, you can theoretically end
> with
> > partially inconsistent data in DB.
> >
> > Marek
> >>
> >>
> >> In which scenario should I consider using MongoDB over an RDBMS or
> >> vice versa? There are off course the usual pro/con's between NoSQL and
> >> RDBMS, but I would like to know to what extend they hold true when it
> >> comes to using Keycloak in production or whether Keycloak is optimized
> >> specifically for NoSQL or RDBMS.
> >>
> >> Regards,
> >>
> >> Ton
> >>
> >
>
> --
>  <http://www.finalist.nl>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160512/16b0c9ea/attachment.html 


More information about the keycloak-user mailing list