Home / Companies / Ory / Blog / Post Details
Content Deep Dive

Scaling Ory Hydra to ~2bn monthly OAuth2 flows on a single PostgreSQL DB

Blog post from Ory

Post Details
Company
Ory
Date Published
Author
Henning Perl
Word Count
1,227
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

Ory Hydra, an open-source OAuth2 and OpenID Connect server, has undergone significant performance optimization to handle high authorization loads, as evidenced by a popular service provider's experience. The enhancements focused on re-engineering Hydra's persistence layer by adopting a transient OAuth2 flow, thus reducing database write traffic by passing AEAD-encoded state between parties instead of storing it in the database. This shift, alongside the introduction of improved database indices, resulted in a dramatic decrease in CPU usage and a reduction in database interactions by 4-5 times while halving database writes. Benchmarks on Microsoft Azure demonstrated that these changes enable Hydra to handle up to 1090 logins per second at peak times, showcasing the server's increased scalability and responsiveness. The Ory team plans to continue optimizing the software to further boost throughput on single PostgreSQL nodes, making Ory Hydra an attractive option for building scalable OAuth2 servers.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.