Problem
I'd like to report an issue I have seen recently when Subsonic server 5 & 6 is used along with Windows Internet Information Services (IIS) set as a reverse proxy with Dynamic IP Restrictions enabled.
TL;DR;
Subsonic only resolves a subset of the forwarded requests as others are denied by the reverse proxy due to "flooding" the server. Result is an intermittent and unstable experience for the web-page based front-end.
Details
My Subsonic server is hosted on a Windows Server with IIS used as a reverse proxy. This setup is not unlike the multitude of users that use Apache/Nginx/etc. on Linux for similar purposes. This experience has been very stable for years, however recently I needed to set up Dynamic IP Restrictions on the server to combat some bots from trolling.
In a nutshell, Dynamic IP Restrictions kind of works like an extremely simplified fail2ban service for IIS hosted services. Using this feature allows the server to stop requests from being processed when a user asks for information too frequently (either simultaneously, or within a time frame) and return errors instead.
Seemingly, when using Subsonic from the web interface, many requests are made to the server simultaneously and in short succession. As a result, after logging in, many of the elements on the page fail to load (the player, cover art, right/left panels, etc.). Looking at the IIS logs, I have confirmed that the error codes associated with the IP restriction settings (403) are returned instead of the successful status code (200). Since the application asks for all these elements at the same time, what loads and what doesn't load changes each time you try so the result is somewhat arbitrary yet always unstable. If I turn dynamic IP restrictions off, all is right in the world of Subsonic and it works as expected (stuff loads, stuff plays, life is good).
Question
Is there any way to control how Subsonic asks the server for data so I can use Dynamic IP Restrictions on my reverse proxy?
Server Configuration
- Windows Server 2012 R2
- IIS 8 Application Request Routing proxy server, URL rewrite reverse proxy, Dynamic IP Restrictions
- Subsonic 5.3 / 6.0b2
Routing Path
Internet/Intranet -> Router -> Windows IIS -> Subsonic Jetty
http://www.MYSERVER.com -> Router Port 80 forward to Windows Server -> IIS URL Rewrite Rule http://www.MYSERVER.com:80>localhost:PORT -> Jetty hosted localhost:PORT
Thanks!
JesterEE