--- title: AnyCable created: 2026-06-08 updated: 2026-06-08 type: app tags: [catalogue, notifications, websockets, real-time, app-marathon-batch-rattrapage-3] confidence: medium contested: false sources: [https://selfh.st/apps/?tag=Notifications, https://anycable.io] --- # 🔔 AnyCable > **Serveur WebSocket scalable pour Ruby/Rails** : drop-in replacement pour ActionCable, jusqu'Ă  10x plus performant. Pas une app « notification » classique mais un **middleware temps rĂ©el**. ## 📋 Informations GĂ©nĂ©rales | Champ | Valeur | | :--- | :--- | | **Site web** | [anycable.io](https://anycable.io) | | **GitHub** | [anycable/anycable](https://github.com/anycable/anycable) | | **License** | MIT | | **Langage** | Go (serveur) + Ruby (gem client) | | **Étoiles GitHub** | 1.8k ⭐ | | **CatĂ©gorie** | [[cat-notifications|Notifications]] *(catĂ©gorie rĂ©elle : Real-time / WebSockets)* | ## 📝 Description **AnyCable** remplace ActionCable (le serveur WebSocket de Rails) par une implĂ©mentation **Go** scalable. Permet de gĂ©rer des **dizaines de milliers de connexions concurrentes** sur un seul serveur, avec **pub/sub distribuĂ©** (Redis, NATS, PostgreSQL). UtilisĂ© en production par : JetBrains, Travelport, etc. **DiffĂ©rence avec un serveur de notification classique** : AnyCable est une **librairie serveur** (pas une app Ă  installer) — vous l'intĂ©grez dans votre app Rails. Ce n'est pas le bon choix si vous cherchez un push simple : voyez plutĂŽt Ntfy ou Gotify. **Pour qui** : Ă©quipes Rails qui veulent **scaler les WebSockets** sans réécrire en Go/Node. ## 🚀 Installation ### Gemfile ```ruby gem "anycable-rails", "~> 1.4" ``` ### Docker Compose (composants) ```yaml version: '3.8' services: anycable: image: ghcr.io/anycable/anycable-go:latest container_name: anycable restart: unless-stopped command: -p 8080 -r redis://redis:6379 ports: - "8080:8080" redis: image: redis:7-alpine container_name: anycable-redis restart: unless-stopped # Your Rails app exposing ActionCable app: build: . environment: - ANYCABLE_URL=ws://anycable:8080 - REDIS_URL=redis://redis:6379 ``` ## 🔄 Alternatives ### Open Source - **ActionCable** (Rails) — Built-in, mais limitĂ© - **Phoenix Channels** (Elixir) — Excellente alternative - [[app-ntfy]] — Pour push simple (pas WebSocket gĂ©nĂ©rique) ### PropriĂ©taires - **Pusher** — SaaS WebSocket - **Ably** — Real-time PaaS - **PubNub** — Real-time messaging ## 🔐 SĂ©curitĂ© - **WSS obligatoire** via reverse proxy. - **Auth via channels** : AnyCable ne fait pas d'auth, votre app Rails le gĂšre via `connection.rb`. - **Rate limiting** : configurer cĂŽtĂ© Go (`--limits`). - **Idempotency** : les broadcasts sont best-effort ; pour critiques, ajouter confirmation applicative. ## 📚 Ressources - [Documentation](https://docs.anycable.io/) - [GitHub](https://github.com/anycable/anycable) - [Benchmarks](https://docs.anycable.io/benchmarks) ## Pages LiĂ©es - [[cat-notifications]] — CatĂ©gorie Notifications - [[app-ntfy]] — Pour notifications simples - [[recettes-docker-compose]] — Templates Docker