> ## Documentation Index
> Fetch the complete documentation index at: https://help.pixwel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Faye

# Faye - real time messaging

Sends realtime messages to the logged in users. Generally reports things like notifications.

## What is Faye?

[Faye](http://faye.jcoglan.com/) is a [websockets](https://pusher.com/websockets) implementation that we run on notifications.pixwel.com. The UI subscribes to endpoints - e.g. a user's browser may subscribe to `notifications.pixwel.com/staging/faye/{my user id}` to get notifications for a given user. This endpoint does not have to exist at the time of subscription, but if any messages get pushed to that endpoint, the user's browser will pick them up.

## Where does Faye run?

* On `development`, it runs locally
* On all other environments, it runs on notifications.pixwel.com with endpoints for the various environments.

## Testing Faye

* Open Chrome and open the web sockets tab of Chrome tools
* Log in as User A
* **Assert that** a web sockets connection is made to Faye
* In an incognito tab, log in as User A and then find User B and click the 'impersonate' button for that user
* As User B, share some assets to User A
* As User A, click Notifications in the grey bar and **assert that** the new share is in there

## Infrastructure

Faye is deployed as a containerized service on **AWS ECS (Fargate)** — see `faye/ecs-faye.service.yml` and `faye/Dockerfile`, deployed with `fargate-deploy.sh`. `notifications.pixwel.com` is a reverse proxy in front of the Faye container, with per-environment paths (for example `notifications.pixwel.com/production/faye`).

> Historically Faye ran on a hand-provisioned EC2 node via Ansible/Upstart; that approach (and its WebSocket-vs-load-balancer caveat) is no longer current — modern AWS load balancers support WebSockets.

***

[Back to docs index](/) | [Next page in recommended reading order >>](/logs-and-telemetry)
