Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvements #580

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

Bohica1
Copy link

@Bohica1 Bohica1 commented Mar 25, 2022

Significant performance improvements

Fixes an issue that was taking place for the default domain. We had an issue where we weren't allowed to add the default domain to the domain table and would cache miss on each and every redirect links.find call against the default domain.

With the standard Kutt processes, a single redirect request takes between 60 and 80 ms on a local machine, and 120 -150 ms on a small Ubuntu server.

After implementing a cache check on the default domain, a local redirect request dropped to 5-10ms.

I also found that be default there weren't indexes to the links.address column, even though that is where the query primarily takes place. Adding an index to this a local redirect request (without the cache optimizations in place) took between 7-15 ms for a read.

  • Adds indexes on database for significantly faster lookups.
  • Adds a check for default domain against the cache. As default domain can't be added to the custom domains, we need to have a default domain check for cache

* Adds indexes on database for significantly faster lookups.
* Adds a check for default domain against the cache. As default domain can't be added to the custom domains, we need to have a default domain check for cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant