RequestCounter

module
v0.0.0-...-89491cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2022 License: MIT

README

RequestCounter

Services to handle and count requests.

Run, Build and Development

  • Requires Golang 1.18, Docker.
  • Set required config in .env.
  • See Makefile command to build and run.

Cluster

  • Single instance service.
  • Counts the number of http requests made to it.
  • Returns current count in a request.
  • Basic async disk persistence.

RequestCounter

  • Multi instance service. Currently 3 replicas.
  • Counts the number of http requests made to it.
  • Makes request to cluster on behalf of client.
  • Returns human readable informational message about node and cluster counts.

nginx

  • Client facing service. Publicy exposed.
  • Reverse proxy to RequestCounter services.
External libs used
  • github.com/pkg/errors: useful for handling and bubbling up errors, with stack traces.

Directories

Path Synopsis
cmd
internal
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL