Ask HN:你们如何在边缘端实现存储转发遥测?
2 分•作者: Aydarbek•6 个月前
我正在研究针对网络不可靠(偏远站点、工业环境、车队等)的边缘/网关遥测模式,这种场景需要离线缓冲、磁盘空间限制以及在恢复连接后重放数据。<p>向正在生产环境中运行此类系统的朋友们提问:<p>你们目前使用什么方案?(MQTT 代理 + ??,Kafka/Redpanda/NATS,Redis Streams,自定义日志文件,嵌入式数据库等)<p>在网络中断期间,你们在哪里进行缓冲:仅追加日志、SQLite/RocksDB、磁盘队列,还是其他方式?<p>当磁盘空间接近满时,你们如何处理反压?(丢弃策略、压缩、采样、优先级)<p>你们最害怕的故障是什么:数据损坏、重放风暴、重复数据、“卡住”的消费者偏移量、磁盘已满、时钟偏差?<p>你们实际需要的保证是什么:零丢失 vs “尽力而为”(你们的界限在哪里)?<p>网关上最重要的指标/告警是什么?(队列深度、重放速率、最旧事件时间、fsync 延迟、磁盘使用率等)<p>我很想了解哪些方案有效,哪些会出问题,以及你们希望现有工具在哪些方面做得更好。
查看原文
I’m researching patterns for edge / gateway telemetry where the network is unreliable (remote sites, industrial, fleets, etc.) and you need offline buffering + bounded disk + replay once connectivity returns.<p>Questions for folks running this in production:<p>What do you use today? (MQTT broker + ??, Kafka/Redpanda/NATS, Redis Streams, custom log files, embedded DB, etc.)<p>Where do you buffer during outages: append-only log, SQLite/RocksDB, queue-on-disk, something else?<p>How do you handle backpressure when disk is near full? (drop policy, compression, sampling, prioritization)<p>What’s your failure nightmare: corruption, replay storms, duplicates, “stuck” consumer offsets, disk-full, clock skew?<p>What guarantees do you actually need: zero-loss vs “best effort” (and where do you draw that line)?<p>What metrics/alerts matter most on gateways? (queue depth, replay rate, oldest event age, fsync latency, disk usage, etc.)<p>I’d love to learn what works, what breaks, and what you wish existing tools did better.