I'm just so much curious about knowing how has discord chat architecture been designed? I just went to the network tab to inspect requests (assuming it to be web sockets or web rtc) and only saw queries for fetching the messages to be displayed and a post request when I send a message. There was really no clue where the message from the other side came from!
Here are the screen shots -
(All Requests)
(My message post request)
(WebSockets tab)
(WebRTC Inspector)
I've no idea where does the message from the other end (my friend) comes to me?
The Network tab is what we call the area of your browser where we can see all of the requests for the files required to load a web page, in the order that they are made. We can see what type of file was requested, where it was requested from, how large the file was, and more.
Massive emphasis on what they call YOUR REQUEST it only shows down requests made by you on the other end the person sending the message on their end recieves a similar POST request as you did for your message, it very well has a websocket and along with that it has its own CDN which is very popular to be known as a "free CDN" out there, all discord messages are distributively stored in an Apache Cassandra 12 node cluster as Discord's main database.
As said "your friend" and you connect through the websocket and both make POST and GET requests simultaneously to the internal API :D