Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Redis and NGINX proxy/load balancer for backend services #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

williamtnguyen
Copy link
Owner

@williamtnguyen williamtnguyen commented May 8, 2021

This change integrates Redis into the session server backend, which allows us to horizontally scale that service, all the state will be stored in Redis, so the state is no longer tied to one machine.

It also integrates NGINX, which serves as a reverse proxy to our backend services, mediasoup server and session server. NGINX also load balances any number of instances we have for the session server.

How to spin up development environment:

cd server
docker-compose up --build //spins up Redis server
npm run dev //in diff terminal tab
cd rtc-server
npm run dev
cd client
npm start

How to emulate production environment (diff docker processes on local machine):

  • Change rtcServerDomain to http://localhost:5000 in /client/src/utils/rtc-socket-client.ts (will figure out a way to make this automatic based on environment)
  • Navigate back to root directory
docker-compose up --build
cd client
npm start

How to test with more sessionServer instances: docker-compose up -d --scale sessionServer=3

@williamtnguyen williamtnguyen force-pushed the feat/redis branch 2 times, most recently from 6677e5b to 1d735da Compare May 8, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant