Downloads · 30 days
0
umar-sharif821/cdn-cache-env-improvedone
cdn-cache-env-improvedone is a reinforcement learning model from umar-sharif821. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product.
For this hackathon, I wanted to build something that felt close to a real infrastructure problem.
Downloads · 30 days
0
Access
Public
Updated Apr 26, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.lock257 KB · 73%
From the Hugging Face model README
For this hackathon, I wanted to build something that felt close to a real infrastructure problem.
A lot of reinforcement learning demos are fun, but they often feel disconnected from systems that engineers actually run in production. I wanted my project to sit closer to that world: networking, latency, logs, cost, traffic spikes, and reliability.
So I built CDN Cache Optimizer.
It is an OpenEnv-compatible environment where an agent learns how to manage an edge CDN cache.
The project is live here:
A CDN edge server has limited storage.
Every time a file is requested, the system has to make a decision:
Should this object stay in cache, should we ignore it, or should we evict something else to make room?
If the file is already cached, the user gets a fast edge response.
If the file is not cached, the request goes back to origin.
That is slower and more expensive.
At small scale, this looks simple.
At internet scale, it becomes a hard optimization problem.
CDNs serve images, videos, scripts, documents, and application assets to users around the world.
A good cache policy can:
A poor cache policy can do the opposite.
It may evict useful files.
It may cache large files that are rarely requested.
It may miss viral traffic bursts.
It may keep sending users back to origin even when the edge cache could have served them.
This is why cache optimization is an interesting RL problem.
LRU is simple:
Evict the least recently used file.
That is a strong baseline, and it works well in many cases.
But it has blind spots.
For example:
That is where an agent can do better.
The agent does not just ask:
What was used least recently?
It can ask:
What is most valuable to keep right now?
The goal of this project is not just to train a model.
The goal is to build a complete benchmarkable environment around a realistic CDN caching problem.
That includes:
The Hugging Face Space runs a Gradio app.
The UI lets the judge choose a CDN task and run a benchmark.
It compares:
The output shows:
Space:
https://huggingface.co/spaces/umar-sharif821/cdn-cache-env-improvedone

