View Full Version : Installed nginx as a proxy


Swede
4th June 2026, 17:56
I've installed nginx as a proxy since 'everyone' says that it's the best way to manage many connections.
Hopefully no one will notice any changes but if there's something broken drop a post here and I'll attend to it as quickly as possible (including reversing the entire thing if it's too bad).

/Swede

Z2697
4th June 2026, 18:21
What can possibly go wrong?

kempodragon
5th June 2026, 20:00
Famous last words :p

Swede
6th June 2026, 07:06
So far everything looks very good. Nothing seems to be broken and the load has gone down considerably! The servers didn't even blink at +60.000 users, not even the fans on the SQL-server started to spin(!)
I knew that many gurus recommend installing a nginx-proxy but I would never have guessed just *how* much it would help.

Z2697
8th June 2026, 07:00
I saw some database error earlier this day (my local time :)), is there something going on?

StainlessS
26th July 2026, 10:40
This was produced a little earlier today when I clicked on "Quick Links/Today's Posts".

I saved the image and a few moments later clicked "Today's Posts" again and no problems.
Thought I'de better post this anyway, in case it helps.

[clickme, twice]
https://i.postimg.cc/62Pb9DxS/Errors.jpg (https://postimg.cc/62Pb9DxS)

Swede
26th July 2026, 10:43
Yeah, sorry about that.. It was my fault. Note to myself: NEVER do three different updates at the same time again! :rolleyes:

Things should be smooth now though.

Adub
9th August 2026, 22:20
Hey Swede, thanks again for your continued hard work hosting the forum (and I've also downloaded the archive tar file as a backup, thanks for doing that).

I recently looked that the network requests, and I realized that the forum is still being served on HTTP 1.1. Have you thought about enabling support for HTTP2? Since you're using nginx already, it should be a pretty simple change: https://nginx.org/en/docs/http/ngx_http_v2_module.html

It has the potential to significantly reduce the number of connection requests, since HTTP2 multiplexes requests over a single TLS connection instead of opening multiple connections like HTTP 1.1.

It would also make the forum faster.

Swede
12th August 2026, 06:17
Hi Adub!

Thanks, I totally forgot about HTTP2 (and to enable it) when I installed nginx. It's now up and running.

/Swede

Emulgator
12th August 2026, 13:46
Good work !
(Maybe unrelated but as it just happened: I ran out of my monthly mobile hotspot quota, fell back to GPRS speed 64kbit/s, and the forum loads snappy as never before)

Adub
12th August 2026, 17:14
Awesome work, thanks Swede!

Adub
13th August 2026, 18:38
Hmm, I'm not sure if it's related to the HTTP2 changes (I doubt it) or if there were other changes made, but I'm getting "ERR_CONNECTION_CLOSED" errors when attempting to access the forum on an iPhone. I've tried several different internet connections.

Things work just fine on a laptop/desktop though, on the same internet connection.

Same thing happens on forum.doom9.se.

Swede
13th August 2026, 20:32
Oups, that was, obviously, a know bug with this setup (nginx, proxy, HTTP2, Safari or rather iOS).

Added:
# Fix iOS/Safari bug with HTTP2 behind proxy
proxy_hide_header Upgrade;

to the configfiles and things are ok... Again... For now...

/Swede

Adub
13th August 2026, 20:49
It's fixed now, thanks Swede!

rwill
17th August 2026, 01:58
Most users ever online was 154,577, Today at 02:54.

Some pages need a couple of seconds to load but the forum is still working overall...

Swede
18th August 2026, 10:31
Yeah, it's starting to be ridicuolus..

It seems that every optimization I do just invites more bots. Like two days ago, when I managed to *really* lighten to load on the SQL-server by adding another index, I happily went to sleep just to wake up to that new High Score of +150.000 :eek: And it seems that instead of cruising at ~20.000+ users the new normal is +60.000.

Well, at least I'm learning the art of optimizing. Maybe I'll explore the benefits of adding another SQL-server as my next step.

/Swede

Jamaika
18th August 2026, 11:05
Hey Swede, thanks again for your continued hard work hosting the forum (and I've also downloaded the archive tar file as a backup, thanks for doing that).

I recently looked that the network requests, and I realized that the forum is still being served on HTTP 1.1. Have you thought about enabling support for HTTP2? Since you're using nginx already, it should be a pretty simple change: https://nginx.org/en/docs/http/ngx_http_v2_module.html

It has the potential to significantly reduce the number of connection requests, since HTTP2 multiplexes requests over a single TLS connection instead of opening multiple connections like HTTP 1.1.

It would also make the forum faster.
As a layman, I don't know what or why, but I see a lot of excitement about http2. I see that http3 is already here.
The latest generation of the protocol, HTTP/3, brings further improvements, particularly in terms of speed and security. Google's solutions, specifically the QUIC protocol (HTTP/3 was initially called HTTP-over-QUIC), also played a significant role in this generation. The move away from the TCP protocol also proved crucial.
Google Gemini will begin to spy on you in full force, embedding Gemini in your messages, phone, and even WhatsApp. Theoretically, you can disable it, but there's practically no information about it.

No one seems to have any illusions anymore that Google or Apple are spying on us under the guise of "collecting information about our preferences." Now they're not hiding it, sending emails to their users and openly announcing that they'll start doing it in full force.

Z2697
20th August 2026, 15:06
As a layman, I don't know what or why, but I see a lot of excitement about http2. I see that http3 is already here.
The latest generation of the protocol, HTTP/3, brings further improvements, particularly in terms of speed and security. Google's solutions, specifically the QUIC protocol (HTTP/3 was initially called HTTP-over-QUIC), also played a significant role in this generation. The move away from the TCP protocol also proved crucial.
Google Gemini will begin to spy on you in full force, embedding Gemini in your messages, phone, and even WhatsApp. Theoretically, you can disable it, but there's practically no information about it.

No one seems to have any illusions anymore that Google or Apple are spying on us under the guise of "collecting information about our preferences." Now they're not hiding it, sending emails to their users and openly announcing that they'll start doing it in full force.

QUIC is just a fancy UDP, there's nothing that will make google spying effortless.
Sure, Chrome has most of the user base. But that's regardless of QUIC ot not.

Z2697
20th August 2026, 15:09
Yeah, it's starting to be ridicuolus..

It seems that every optimization I do just invites more bots. Like two days ago, when I managed to *really* lighten to load on the SQL-server by adding another index, I happily went to sleep just to wake up to that new High Score of +150.000 :eek: And it seems that instead of cruising at ~20.000+ users the new normal is +60.000.

Well, at least I'm learning the art of optimizing. Maybe I'll explore the benefits of adding another SQL-server as my next step.

/Swede

What was the record before the bot boom?

Adub
20th August 2026, 22:05
Yeah, it's starting to be ridicuolus..

It seems that every optimization I do just invites more bots. Like two days ago, when I managed to *really* lighten to load on the SQL-server by adding another index, I happily went to sleep just to wake up to that new High Score of +150.000 :eek: And it seems that instead of cruising at ~20.000+ users the new normal is +60.000.

Well, at least I'm learning the art of optimizing. Maybe I'll explore the benefits of adding another SQL-server as my next step.

/Swede

Do you have any rate limiting setup by chance? I know that nginx has native support for it, so I figure that would be a good preventative measure to prevent bot abuse.

Swede
25th August 2026, 20:58
The problem with Rate Limit is that the bots doesn't use the same IP, rather they span a /24 or even a /16 net so it's not much of a help.

I've been offline for a few days and the load was ridiculous when I returned kicking of another find-out-why-mission in the logs. There was an enormous increase in the 'Printable Version' of the threads, resulting in me removing that option. If you need/want that version pls use the archive as it's cached (and then of course sadly not 100% up to date but I'll try to update it somewhere like once a month).