Hey Developers, boss ass niggas (MOB)
In social media what does a reverse proxy do? What is the purpose of it?
Hey Developers, boss ass niggas (MOB)
In social media what does a reverse proxy do? What is the purpose of it?
It's not specific to social media.
When you connect to a site, your browser sends a request to a server, which handles things like encryption (https) and figures out what you're trying to do. This server doesn't host the content itself, but acts as a gateway to the server that does - hence "reverse proxy". Keeping them separate like this has some security and performance benefits, think having a bouncer at the club entrance as opposed to having bar staff take care of shit themselves.
Server =/= physical machine, so your reverse proxy server can be running on the same machine (or virtual machine) that Lemmy is running on, for example. There's nothing dodgy about a site using a reverse proxy, in fact it would be very sloppy not to use one.
Yea I just get paranoid lol This is because I don't know programming language. So a lot of it sounds nefarious even though it might not be
Kinda hard to describe. For a website you usually have severally programs that do different things. The User interface, which is the website you interact with, the middle teir, which is usually in a strongly typed language like java, golang, or Rust (in the case of lemmy.) It usually sleakes to a database to store user information. Like Postgres or mysql. Then you might have very topic specific programs. Like picture hosting programs. Lemmy had one called pictrs. It's responsible for uploading, shrinking, storing, retrieving pictures people upload. For example, when you upload a photo it makes atleast two copies. One large and one small. The small one is loaded up in the main page so the list loads quicker.
When you enter a address in the address bar, a reverse proxy is often in charge of which service get called. The reverse proxy sits in front of all those programs and coordinates the communication between all of them.
This can be used for load balancing. Large companies especially can't handle millions of people logging into 1 computer. So a reverse proxy can split the connections. Send some here, some there, some over yonder.
Nginx is the most popular reverse proxy. Written in C by Russians. It's really replaced Apache over the last 10 yeats. Cady is a newer but slower one written in golang. It's easier to use I've heard.
Basically a reverse proxy forwards web request to multiple servers or virtual servers.
"10 yeats" lol 😆 that made me laugh lol
Yeah I was researching a lot about the pictures you mentioned and a lot of the other stuff that you mentioned reading their posts it's crazy.
What do you think of this?
Me just being paranoid?
I run one, it basically lets you have one server that appears to host all your different websites, even if those websites are on different servers.
My search site, my lemmy site, my lotide site, and fbxl social are all hosted on different physical machines, but all of them are presented to the outside world using one webserver running the reverse proxy, and then the webserver reaches out to those different webservers inside my network and makes the content available to the outside world.
It's called a "reverse proxy" because with a normal proxy server you'd use one server called a proxy server to go out onto the internet and connect to all the different servers in the outside world, but with a reverse proxy the outside world uses one server to connect to all your servers inside your private network.
There are two reasons to run a reverse proxy.
The first is that if you only have one outside IP address, you can only host one webserver at ports 80 and 443, but if you want to host a lot of different websites then you need one webserver to recieve all the requests and dispatch them to where they need to go based on the hostname you're accessing the server using. (so for example, www.fbxl.net, social.fbxl.net, lotide.fbxl.net, and lemmy.fbxl.net all point to the same server, and that server redirects you based on who you're looking for)
The second is that it lets you have one server that's handling all the "outside world" stuff. Despite having all these servers, the only one that's directly connected to the outside world is the reverse proxy, and so you can focus on making sure that one is particularly hardened.
There are other forms of reverse proxy, but I'm focusing on webservers here since that's what I'm usually dealing with.