Simple API service that increments a counter persisted in Redis Cluster.
151
This repository contains a simple API service that increments a counter persisted in Redis Cluster. The Hit Counter API is a lightweight web service designed to track and increment hit counts for specified keys, typically used for monitoring page views or event occurrences. It exposes simple HTTP endpoints to increment and retrieve hit counts, persisting the data in a Redis Cluster for high availability and scalability. This makes it suitable for use cases where fast, distributed, and reliable counting is required.
This project implements a REST API with two endpoints:
/read — Returns the current counter value from Redis Cluster./write — Increments the counter in Redis Cluster and returns the new value.The service is written in Go, containerized with Docker, and deployable to Kubernetes with provided manifests.
The following diagram briefly shows the architecture
┌──────────────┐ ┌──────────────┐ ┌───────────────┐
│ Client │ <--> │ hit-couter │ <--> │ Redis Cluster │
│ │ │ API │ │ │
└──────────────┘ └──────────────┘ └───────────────┘
/read and /write requests.More information: https://github.com/alsusar/hit-counter
Content type
Image
Digest
sha256:9e26c0b0d…
Size
8.6 MB
Last updated
over 1 year ago
docker pull alsusar/hit-counter:1.0.0