peers / peerjs-server

Server for PeerJS
https://peerjs.com
MIT License
4.34k stars 1.08k forks source link

[QUESTION] Is peerjs-server compatible with AWS Elastic Beanstalk? #146

Closed aldovincenti closed 4 years ago

aldovincenti commented 4 years ago

I was wondering if peerjs-server would be compatible with AWS Elastic Beanstalk.

Elastic Beanstalk applications should also be as stateless as possible, using loosely coupled, fault-tolerant components that can be scaled out as needed.

Source: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.concepts.design.html

Did anyone try it?

kidandcat commented 4 years ago

I don't think so, PeerServer needs a mongoDB, and I'm not sure if it still keeps state in memory @afrokick ?

If it doesn't, if you host your mongoDB somewhere else, it could work

aldovincenti commented 4 years ago

@kidandcat MongoDB? I don't see any reference to it in the documentation...

afrokick commented 4 years ago

It stores data in-memory. So, we don't use MongoDB

RealHandy commented 4 years ago

I've got it working. I use port 9000 to receive both peerjs-server and http requests. My ALB listens on 9000 and passes all the requests through to my server instance.

Payetus commented 4 years ago

@RealHandy could you share your Dockerrun.aws.json ?

RealHandy commented 4 years ago

@Payetus I don't use docker, unfortunately. But I did do a writeup of my settings on StackOverflow that might be helpful, maybe, possibly? https://stackoverflow.com/questions/58793966/node-js-server-with-websockets-on-elastic-beanstalk-alb-without-socket-io/58793967#58793967