Home > Back-end >  Node IIS Reverse Proxy Slow Performance Issue
Node IIS Reverse Proxy Slow Performance Issue

Time:06-20

I'm hosting a Node/Express application on Windows Server through IIS. I've created a reverse proxy to redirect to localhost:3000 which is where my Node app is running.

The node app can be accessed by another computer on the network by navigating to node-app/. All endpoints can be accessed and everything seems to work fine.

However when making database changes i.e: updating/inserting records the changes are processed by the database instantly, but the site doesn't reflect the changes until multiple minutes after the change is made.

The latency however completely disappears if providing the port to the URL i.e: node-app:3000/. This had led me to the conclusion that the issue must be in the url rewriting/reverse proxy processes? My web.config is as follows:

<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                <match url="(.*)" />
                <action type="Rewrite" url="http://localhost:3000/{R:1}" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>

This is a bit foreign territory for me, so any help is appreciated.

CodePudding user response:

Thank you to user abondoa for mentioning caching! There is a setting in IIS called Output caching.

Disabling this setting allowed the changes to reflect instantly as they should!

  • Related