1
0
Fork 0
mirror of https://github.com/benbusby/farside.git synced 2025-04-19 18:38:42 +00:00
A smart redirecting gateway for various frontend services
Find a file
Ben Busby 8ee4f308a4
Prevent same instance from being selected twice in a row
Introduces a new db key "<service>-previous" to track which instance was
last selected for a particular service. This allows for filtering the
list of available instances to exclude the instance that was last
picked, to ensure a (slightly) more even distribution of traffic.
There's still the possiblity of the following scenario, however:

:service instances > 2

/:service request #1 -> instance #1
/:service request #2 -> instance #2
/:service request #3 -> instance #1
/:service request #4 -> instance #2

where there are many ignored instances for a particular service. One
possible solution would be to implement the "<service>-previous" value
to be a list, rather than a single value, and push to that list until
only one element is left in the original "instance" array after
filtering, and then delete the "<service>-previous" key.
2021-11-10 12:19:37 -07:00
.github/workflows Test for valid service redirects 2021-11-10 11:47:03 -07:00
config Prevent same instance from being selected twice in a row 2021-11-10 12:19:37 -07:00
img Add readme banner 2021-11-08 17:30:45 -07:00
lib Prevent same instance from being selected twice in a row 2021-11-10 12:19:37 -07:00
test Prevent same instance from being selected twice in a row 2021-11-10 12:19:37 -07:00
.formatter.exs Setup basic Plug.Router framework for serving requests 2021-10-22 18:28:12 -06:00
.gitignore Write results of update script to file for debugging 2021-10-22 18:07:59 -06:00
index.eex Display list of available instances on home page 2021-11-08 17:08:19 -07:00
LICENSE Initial commit 2021-10-21 15:50:04 -06:00
mix.exs Refactor project to new name 2021-11-07 12:29:06 -07:00
mix.lock Display list of available instances on home page 2021-11-08 17:08:19 -07:00
README.md Update README.md 2021-11-08 17:32:55 -07:00
services.json Display list of available instances on home page 2021-11-08 17:08:19 -07:00
update.exs Prevent same instance from being selected twice in a row 2021-11-10 12:19:37 -07:00

Farside


Elixir CI

A redirecting service for FOSS alternative frontends

Development

  • Install redis
  • Install elixir
  • Start redis: redis-server /usr/local/etc/redis.conf
  • Install dependencies: mix deps.get
  • Initialize redis contents: mix run update.exs
  • Run Farside: mix run --no-halt
    • Uses localhost:4001