GithubHelp home page GithubHelp logo

Comments (4)

josephdecock avatar josephdecock commented on June 14, 2024 2

In addition, we would also like to consider fuzzing the startup time of the cleanup job to mitigate the "thundering herd" issue, where all scaled instances start their job at once.

from identityserver.

josephdecock avatar josephdecock commented on June 14, 2024

Docs for reference - https://learn.microsoft.com/en-us/ef/core/saving/execute-insert-update-delete

from identityserver.

bbartels avatar bbartels commented on June 14, 2024

I created this PR to use ExecuteDelete during frequently used persistedgrant operations #1427

from identityserver.

josephdecock avatar josephdecock commented on June 14, 2024

Making this change probably can't be done at all for server side sessions, and might require a breaking change for token cleanup.

The session cleanup job needs to load the sessions it is cleaning up in order to do coordination (we can't send logout notifications when a session times out without loading the session to find out which clients to notify). There might be small optimizations possible, but the fundamental problem remains that we need to load the records as they are deleted.

The token cleanup job could be changed to use these APIs, but we would need to stop using the IOperationalStoreNotification. Currently, the token cleanup job sends all the records it deletes to that service, if one is registered. This is an optional dependency that I didn't even know we had, but it's been around for years now. Obviously if we change our cleanup to stop loading the records we're deleting, we can't send those records to the notification service, and this is a breaking change for anyone who implemented that interface.

Options:

  1. Accept the breaking change
  2. Maintain two versions of the cleanup service - one which is the same as we have today, and the other which doesn't send notifications because it is more optimized. We could make the optimized cleanup service be the default, but make the method that registers the notification switch to the legacy service
  3. As a variation of option 2, we could put both code paths in the cleanup service, and switch between them based on if we have a registered notification service
  4. Reject this idea and do nothing

from identityserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.