{"id":51045602,"url":"https://github.com/anuragxxd/redrush","last_synced_at":"2026-06-22T13:32:23.391Z","repository":{"id":364835651,"uuid":"1221473472","full_name":"anuragxxd/redrush","owner":"anuragxxd","description":"Event-driven, low-latency filesystem-to-S3 sync daemon. Apache-2.0.","archived":false,"fork":false,"pushed_at":"2026-04-26T09:41:07.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-14T18:30:04.945Z","etag":null,"topics":["devops","filesystem-watcher","golang","kubernetes","minio","s3","sidecar","sync"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anuragxxd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T08:58:37.000Z","updated_at":"2026-04-28T03:12:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anuragxxd/redrush","commit_stats":null,"previous_names":["anuragxxd/redrush"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/anuragxxd/redrush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuragxxd%2Fredrush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuragxxd%2Fredrush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuragxxd%2Fredrush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuragxxd%2Fredrush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anuragxxd","download_url":"https://codeload.github.com/anuragxxd/redrush/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuragxxd%2Fredrush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34651748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","filesystem-watcher","golang","kubernetes","minio","s3","sidecar","sync"],"created_at":"2026-06-22T13:32:22.823Z","updated_at":"2026-06-22T13:32:23.382Z","avatar_url":"https://github.com/anuragxxd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  RedRush\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eEvent-driven, low-latency filesystem-to-S3 sync daemon.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/anuragxxd/redrush/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/anuragxxd/redrush?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/anuragxxd/redrush/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/anuragxxd/redrush?style=flat-square\" alt=\"Release\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Watches a local directory for changes via kernel events and uploads files to any S3-compatible object storage.\u003cbr\u003e\n  Files remain browsable in the bucket exactly as they appear on disk.\u003cbr\u003e\n  One binary. Zero config files.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#architecture\"\u003eArchitecture\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#kubernetes-sidecar\"\u003eKubernetes Sidecar\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Why\n\nNo production-grade, permissively-licensed, event-driven local-to-S3 sync daemon exists:\n\n| Tool | Problem |\n|------|---------|\n| `mc mirror --watch` | AGPL, silent failures, no crash recovery |\n| `s3sync-service` | GPL-3.0, polling-based, latency = poll interval |\n| `rclone` | MIT but no daemon/watch mode |\n| `lsyncd` | GPL, no native S3 |\n\nRedRush fills this gap. Apache-2.0. Event-driven. Crash-recoverable.\n\n## Quick Start\n\n```bash\nexport REDRUSH_WATCH_DIR=/workspace\nexport REDRUSH_S3_ENDPOINT=http://minio:9000\nexport REDRUSH_S3_BUCKET=my-bucket\nredrush\n```\n\nOr with Docker:\n\n```bash\ndocker run \\\n  -e REDRUSH_WATCH_DIR=/workspace \\\n  -e REDRUSH_S3_ENDPOINT=http://minio:9000 \\\n  -e REDRUSH_S3_BUCKET=my-bucket \\\n  -v /workspace:/workspace:ro \\\n  redrush:latest\n```\n\n## Features\n\n- **Event-driven uploads** \u0026mdash; file changes detected via kernel events (fsnotify), not polling\n- **Per-path debouncing** \u0026mdash; coalesces rapid writes with a configurable quiet window and max-wait ceiling\n- **Periodic reconciliation** \u0026mdash; full-scan safety net on startup, on timer, and on event overflow\n- **Delete sync** \u0026mdash; optionally mirrors local deletions to S3\n- **Worker pool** \u0026mdash; bounded concurrent uploads with configurable parallelism\n- **Multipart uploads** \u0026mdash; automatic multipart for large files via AWS SDK manager\n- **Crash recovery** \u0026mdash; reconciler detects and uploads anything missed while offline, including same-size content changes via mtime metadata\n- **Graceful shutdown** \u0026mdash; SIGTERM/SIGINT triggers watcher stop, debounce flush, upload drain with configurable timeout\n- **One-shot mode** \u0026mdash; run a single reconciliation pass and exit\n- **Distroless Docker image** \u0026mdash; ~10MB, runs as nonroot\n- **Zero config files** \u0026mdash; everything via environment variables\n\n## Configuration\n\nAll configuration is via environment variables. No config files.\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `REDRUSH_WATCH_DIR` | \u0026mdash; | **(required)** Directory to watch |\n| `REDRUSH_S3_ENDPOINT` | \u0026mdash; | **(required)** S3/MinIO endpoint URL |\n| `REDRUSH_S3_BUCKET` | \u0026mdash; | **(required)** Target bucket |\n| `REDRUSH_S3_PREFIX` | `\"\"` | Key prefix for all uploads |\n| `REDRUSH_S3_REGION` | `us-east-1` | S3 region |\n| `REDRUSH_DEBOUNCE_MS` | `500` | Debounce quiet window (ms) |\n| `REDRUSH_MAX_WAIT_MS` | `2000` | Max debounce ceiling (ms) |\n| `REDRUSH_UPLOAD_WORKERS` | `8` | Concurrent upload goroutines |\n| `REDRUSH_QUEUE_SIZE` | `1000` | Upload queue depth |\n| `REDRUSH_RECONCILE_INTERVAL` | `60s` | Periodic full-scan interval |\n| `REDRUSH_DELETE_MODE` | `ignore` | `ignore` or `sync` |\n| `REDRUSH_FOLLOW_SYMLINKS` | `false` | Resolve and upload symlink targets |\n| `REDRUSH_MULTIPART_THRESHOLD` | `16MB` | File size threshold for multipart |\n| `REDRUSH_DRAIN_TIMEOUT` | `30s` | Shutdown drain timeout |\n| `REDRUSH_LOG_LEVEL` | `info` | `debug`, `info`, `warn`, `error` |\n| `REDRUSH_ONE_SHOT` | `false` | Run one reconciliation and exit |\n\n## Architecture\n\n```\n┌──────────────────────────────────────────┐\n│                RedRush                    │\n│                                           │\n│  Watcher ──▶ Debouncer ──▶ Upload Queue   │\n│  (fsnotify)  (per-path)    (bounded chan)  │\n│                                 │         │\n│  Reconciler ──────────────▶ S3 Uploader   │\n│  (periodic)                (worker pool)  │\n│                                           │\n│  Lifecycle (signal handling, drain)       │\n└──────────────────────────────────────────┘\n       │                         │\n  /watch-dir                S3-compatible\n  (read-only)               object storage\n```\n\n**Watcher** detects filesystem events and feeds them through a per-path **Debouncer** into a bounded upload queue. A pool of **S3 Uploader** workers consume from the queue. The **Reconciler** runs on startup, periodically, and on event overflow to catch anything the watcher missed. The **Syncer** orchestrates all components and manages graceful shutdown.\n\n## Expected Latency\n\n| Phase | Time |\n|-------|------|\n| Kernel event delivery | \u003c 1ms |\n| Debounce window | 500ms (configurable) |\n| S3 PUT (small file, same network) | 10\u0026ndash;50ms |\n| **Total: small file visible in S3** | **~1\u0026ndash;2s** |\n\n## Kubernetes Sidecar\n\nRedRush is designed for use as a K8s native sidecar (`restartPolicy: Always` init container):\n\n```yaml\ninitContainers:\n- name: redrush\n  restartPolicy: Always\n  image: redrush:latest\n  env:\n  - name: REDRUSH_WATCH_DIR\n    value: /workspace\n  - name: REDRUSH_S3_ENDPOINT\n    value: http://minio.svc:9000\n  - name: REDRUSH_S3_BUCKET\n    value: workflows\n  - name: REDRUSH_S3_PREFIX\n    value: v1/runs/$(RUN_ID)/workspace/\n  volumeMounts:\n  - name: workspace\n    mountPath: /workspace\n    readOnly: true\n```\n\n## Development\n\n```bash\n# Build\nmake build\n\n# Unit tests\nmake test\n\n# Integration tests (Docker + MinIO)\nmake integration\n\n# Lint\nmake lint\n\n# Docker image\nmake docker\n```\n\n## What RedRush Does NOT Do\n\n- Bidirectional sync\n- Conflict resolution\n- File locking or coordination\n- FUSE mounting\n- Metrics endpoint (planned)\n\n## Dependencies\n\n| Package | License |\n|---------|---------|\n| [fsnotify](https://github.com/fsnotify/fsnotify) v1.9.0 | BSD-3-Clause |\n| [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) | Apache-2.0 |\n| Go stdlib (`log/slog`, `os`, `path/filepath`, `sync`, `time`) | BSD-3-Clause |\n\n## License\n\nApache-2.0 \u0026mdash; see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuragxxd%2Fredrush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanuragxxd%2Fredrush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuragxxd%2Fredrush/lists"}