Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-2408

Improve AliasBasedTokenState service performance

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.5.0
    • Component/s: Server
    • Labels:
      None

      Description

      While working on KNOX-2402 there were some performance issues related to AliasBasedTokenStateService which the new tool revealed during the test phase:

      AliasBasedTokenStateService:

      • updateExpiration() goes directly to alias service rather than updating it locally and let the background thread does its job
      • getTokens goes directly to alias service

      DefaultTokenStateService:

      • we should start using ConcurrentHashMap instead of HashMap for tokenExpirations and maxTokenLifetimes -> many of the synchronization blocks could be get rid of (CHM gives better performance anyway)
      • review getTokens() usage
      • eviction: needs to consider the case when Gateway was restarted -> nothing found in memory -> eviction is extremely slow

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                smolnar Sandor Molnar
                Reporter:
                smolnar Sandor Molnar
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m