design – Developing a scalable websocket architecture that supports “rooms” both public and private

So as a personal project I want to build a scalable containerized websocket chat application that supports independent rooms that both can be publicly joined as well as secured with a password. I find it trivial to build a application that supports public rooms via the library with support from adapter to provide horizontal scaling. However I have issues coming up with a design that supports secure rooms across multiple nodes.

I currently just store rooms in a postgres database, I feel like that won’t scale very well.

I want to clarify the goal of the project is to learn system design and be a solid contender on my resume.