gifted-angle-64519
08/04/2022, 4:21 PM.ToSession()
network call. So far so good. The problem that I see is that that call takes some amount of time, currently 500ms. Even if it's improved to 0ms + latency, it's still a network call that chips away from one of the most important metrics for a web app.
• Is there a way to improve this solution with what I got in Ory Cloud?
• How is this issue usually solved? Would it be solved if the cookie was a JWT that could be validated without a network request instead of an opaque string generated for me by Ory Cloud?purple-tailor-16179
08/04/2022, 4:38 PMory_session_
, anonymous sessions are not impacted
• to speed up page changes, I keep sessions cached for 15 minutes. How long the cache can be depends on how fast you want to be able to respond to session termination. For a high-volume commercial project, I'd investigate shortening that cache duration and refreshing the cache in the background before expiration, but my small weekend-project is not there, so users get a 150ms "penalty" every 15 minutes.
Kratos' design is different from the OAuth & JWT ecosystem on purpose, and I personally find it simpler and more robust. It does come with its own learning curve and a set of limitations of course.fast-lunch-54279
gifted-angle-64519
08/08/2022, 7:05 AM