Skip to content

About

High performace caching with a non-persistent Redis layer and a persistent Postgres SQL.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

High Performance Cache

This is my first attempt in creating a high performance database system while learning Rust.

Features

  • Caching layer non-persistent (e.g. Redis) and persistent layer (e.g. Postgres SQL). (See https://redis.com/wp-content/uploads/2023/04/redis-enterprise-for-caching.pdf)
    • In-memory cache (fastest, but volatile)
    • Redis cache (medium speed, distributed)
    • PostgreSQL database (persistent storage)
  • Support 5000 read requests per second with subsecond average latency on each request.
  • Support 5000 write requests per second with subsecond average latency on each request.
  • High Concurrency

Installation

Clone the repository

git clone https://github.com/jacksonbaxter/high-performace-cache.git

Enter the project repository

cd high-performace-cache

Build and run the project with Docker

# Build and start
docker-compose up --build

To rebuild the project and restart the database

# Clean up first
docker-compose down --volumes --remove-orphans

# Rebuild and start
docker-compose up --build

How to Use Basic CRUD Operations

Store a value in cache

# PUT request to store data
curl -X PUT -H "Content-Type: application/json" \
  --data '{"some":"data"}' \
  http://localhost:8080/cache/mykey

Retrieve a value

# GET request to retrieve data
curl http://localhost:8080/cache/mykey

Delete a value

# DELETE request to remove data
curl -X DELETE http://localhost:8080/cache/mykey

Check health

# Health check endpoint
curl http://localhost:8080/cache/health

About

High performace caching with a non-persistent Redis layer and a persistent Postgres SQL.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages