Skip to content

iw4p/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-shortener

System Design URL Shortener in Golang

Client: Users accessing the web application. Load Balancer: Distributes incoming traffic across multiple web servers. Web Servers: Serve the web content and handle client requests. Analytics MicroService: Collects and analyzes data from the web servers. Database: Stores the application's data. Cache Database: Stores frequently accessed data for faster retrieval.

graph TD
A[Client] --> B[Load Balancer]
B --> C[Web Servers]
C --> D[Database]
C --> E[Cache Database]
C --> F[Analytics MicroService]
B --> A
Loading

The Client sends a request to the Load Balancer.

The Load Balancer distributes the request to one of the Web Servers.

The Web Servers process the request, which may involve reading from or writing to the Database.

The Web Servers can also read from or write to the Cache Database to improve performance.

The Web Servers send relevant data to the Analytics MicroService for analysis.

The Web Servers return the response to the Client via the Load Balancer.

Entities

URL

ID - int

original url - string

shortened url - string

Database

MongoDB

Set "short_id" as an index to find document more optimized and faster. Set ".SetExpireAfterSeconds(3600)" to have shorted urls in mongodb for only 1 hour

About

System Design URL Shortener in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published