# New storage in Keycloak

DevFeed: [New storage in Keycloak](<https://devfeed.tech/articles/new-storage-in-keycloak-31597.md>)

Original publisher: [Read original article](<https://www.keycloak.org/2022/07/storage-map>)

Author: Hynek Mlnařík

Published: 2022-07-27T00:00:00Z

Content type: article

Language: en

Sources: [Keycloak Blog](<https://devfeed.tech/sources/keycloak-blog.md>)

Topics: [Keycloak](<https://devfeed.tech/topics/keycloak.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Quarkus](<https://devfeed.tech/topics/quarkus.md>)

Tags: [cloud](<https://devfeed.tech/tags/cloud.md>), [cockroachdb](<https://devfeed.tech/tags/cockroachdb.md>), [database](<https://devfeed.tech/tags/database.md>), [git](<https://devfeed.tech/tags/git.md>), [idm](<https://devfeed.tech/tags/idm.md>), [kerberos](<https://devfeed.tech/tags/kerberos.md>), [keycloak](<https://devfeed.tech/tags/keycloak.md>), [ldap](<https://devfeed.tech/tags/ldap.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [openid-connect](<https://devfeed.tech/tags/openid-connect.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [quarkus](<https://devfeed.tech/tags/quarkus.md>), [saml](<https://devfeed.tech/tags/saml.md>), [sso](<https://devfeed.tech/tags/sso.md>)

## AI overview

The article introduces Keycloak 19's early-preview map storage, designed to support no-downtime upgrades, per-realm storage, and cloud-native deployment. The preview supports PostgreSQL, CockroachDB, and Infinispan, but is not production-ready and does not support several databases available through the legacy store.

## Source excerpt

The current store in Keycloak has some known limitations. For small deployments, it takes too long to initialize the database and start Keycloak. There is no native support for cloud-native deployment. Upgrading to a new Keycloak version often means a requirement for stop-the-world updates with little chance for no downtime upon upgrade. Keycloak 19 brings in an early preview of the future Keycloak store supporting no-downtime upgrades, per-realm storage, and cloud-nativity from its very inception. This so called map storage stays focused at delivering optimal experience and thus limits its support to Postgres and CockroachDB databases, and Infinispan datastore. The early preview is available in the Quarkus distribution. This early preview lacks several features necessary for optimal performance and is thus not yet production ready; still we have a plan to deliver those: In Keycloak 20, expect improved support especially for CockroachDB; and also a file-based store. Together with another anticipated feature tree store - it would be possible to combine several storage mechanisms and have e.g. several static client declarations in static files managed in a versioning system like Git, combined with dynamic clients stored in a database. Per-request object caching is on radar for Keycloak 20 too and should result in significantly better performance. In Keycloak 21, expect LDAP support, and an offline tool for migrating data from legacy store to new one, and further optimizations and garbage collection Note that the store used in previous versions (now called legacy store) does not go away soon! Since the new store is not yet production ready, it remains the default store in Keycloak 19. Also other databases (MySQL, MariaDB, MS SQL Server, Oracle) are not supported by the new store, these are only supported by the legacy. We do consider second-level support for these databases, based on results of a community survey. For development and testing purposes, we offer a fast i