A Scalable URL shortener service implemented in Golang with Redis and MongoDB for storage, and Docker for containerization.
- Shorten long URLs into easy-to-share links
- Store URL mappings in both Redis and MongoDB for performance and durability
- Retrieve original URLs by visiting the shortened link
- Dockerized for easy deployment
Before you begin, ensure you have met the following requirements:
- Golang installed
- Redis server installed and running
- MongoDB server installed and running
- Docker installed (optional, for containerization)
-
Clone this repository:
git clone https://github.com/swarajkumarsingh/ziplink.git
-
Navigate to the project directory:
cd ziplink
-
Install the required Go packages:
go mod tidy
- POST requests (Create Short-URL): Average 856.728106ms (shared cloud cluster)
- GET requests (REDIRECT URL): Average 5.33ms (Redis, MongoDB)
- Mongodb client(local, atlas)
- Redis client(local, cloud)
- After installing docker, just run dev.bat(windows), linux and mac run make run(Note: Mongodb, and redis client should be running,) NOTE: Add configs as shown in run.example.sh
./run.sh
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and test thoroughly.
- Commit your changes with clear commit messages.
- Create a pull request against the main branch.
This project is licensed under the MIT License. See the LICENSE file for details.