Skip to content

Instantly share code, notes, and snippets.

@nesty92
nesty92 / redis-stream-ordered-processing.lua
Created May 9, 2024 18:36 — forked from drslump/redis-stream-ordered-processing.lua
Lua (teal) snippet to implement ordered processing for redis streams
--- Redis Stream with ordered processing
---
--- Redis streams support multiple consumers for throughput and reliability however it doesn't offer
--- a native mechanism for processing a set of messages in a specific order.
---
--- It's possible though to implement a simple algorithm that resembles Kafka's partitioning algorithm:
---
--- - a logical stream becomes N streams in redis (shards from now on)
--- - producers place the message into one of the stream shards based on the hashing of some attribute
--- - each consumer in the consumer group "acquires" a subset of the streams
@nesty92
nesty92 / wireguard_udp2raw.md
Last active November 17, 2020 02:40
Wireguard over udp2raw

Server

udp2raw_amd64 -s -l0.0.0.0:24447 -r 127.0.0.1:51820  --raw-mode udp -k "SOME_RANDOM_KEY" -a

Client

udp2raw_amd64 -c -l127.0.0.1:24448  -rPUBLIC_IP:24447 --raw-mode udp -k "SAME_PREVIOUS_RANDOM_KEY" -a
#!/usr/bin/env bash
# Allows to easily spin up a Docker Swarm Mode (1.12+) monitoring solution
# Prometheus (metrics database) http://<host-ip>:9090
# AlertManager (alerts management) http://<host-ip>:9093
# Grafana (visualize metrics) http://<host-ip>:3000
# NodeExporter (host metrics collector)
# cAdvisor (containers metrics collector)
#
# Larry Smith Jr.