Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
go
go
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • SRCT
  • gogo
  • Merge Requests
  • !9

Closed
Opened Sep 09, 2014 by Akshay Karthik@akarthikDeveloper
  • Report abuse
Report abuse

Hashid generation

  • Overview 0
  • Commits 67
  • Changes

Use Hashids to generate shortUrls.

Right now we will hit collisions at a 50% rate at 10k urls assuming perfect randomness. Using hashids reduces the chance of collisions as the number of urls increase.

Hashids are guarenteed unique. The downside being that as the number of urls get larger, the hashids will get longer as well. The rate is exponential though with roughly number of characters as log base alphabet length of (id + seed).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
Reference: srct/go!9
Source branch: hashid_generation