Skip to content

hackclub/thwomp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Thwomp

A sentient stone block that blocks web traffic from accessing your servers during maintenance periods.

Or in other words, a rudimentary hand-rolled maintenance mode.

Assumptions

This silly stone block has quite a few assumptions:

  • You're using some sort of load balancer or proxy
    • For HCB, we have a Hetzner Load Balancer in front of our servers
  • You're able to deploy Thwomp on all the same servers (that are targets of the load balancer)
  • SSL is terminated at the LB/proxy (e.g. this Nginx server doesn't need to handle SSL)
  • You're able to access the Hetzner Cloud dashboard to switch the target port of the service in the load balancer

How to use it

  1. Deploy this

    For HCB, we use Coolify. We have it deployed on all the same servers as HCB and port mapped to 81:80 (81 on host, 80 in container).

    Here's why:

    • Instead of adding/removing servers from the LB, we can simply switch the target port that the LB sends traffic to.
    • By switching the target port to 81, it means that all target servers in the LB must respond on port 81, and thus Thwomp must be running on all servers.
  2. Go to the load balance and update the service to target port 81 instead of 80.

  3. Your users get thwomp'ed with a maintenance mode page!

About

๐Ÿ—ฟ Thwomp your web traffic

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published