Automatic detection of 'remote' mode ?

Issue #669 resolved
Brian Lewis repo owner created an issue

/?remote=true option on starting application causes all 3rd party js libraries ( angularjs, d3, jquery etc etc) to get loaded from cloudflare cdns; rather than from the EMIS server.

Whether this is quicker depends on your location wrt these two servers. At one extreme, a user connecting to an EMIS server in RMI from another country will do better to use cloudflare; but a user on the same LAN as the EMIS server is better without remote option. Users in FSM in a different state to the server may well do better with remote, but that could be dependent on how their internet connection is actually routed.

Perhaps we can establish some rules? ie allow some IP masks to be specified in web.config , and determine transparently whether to use remote based on these rules.

As a related issue we would want to be able to turn off remote if it was applied automatically ( for testing?) , so support options

/?remote use remote

/?remote=true use remote

/?remote=false don't use remote

Comments (3)

  1. Brian Lewis reporter

    As well as support ?remote (ie valueless query string parameter), also support via AppSetting in web.config:

          <!-- specify ip address range that should be considered "local" 
                "local" clients get 3rd party javascript libraries from this server
                these can in in the form e.g. 10.0.0.0/24 
                multiple ranges can be used separated by semicolon
          -->
    <!--      <add key ="localIp" value="10.0.0.0/24; 193.2.7.4"/>      -->
          <!-- specify ip address range that should be considered "remote"  
                "remote" clients get 3rd party javascript from cloudflare cdn,
                which may be quicker to access than this server
    
               remoteIp cannot be used with localIp (ie localIp takes precedence)
          -->
          <add key ="remoteIp" value="203.0.0.0/8"/>
    
  2. Log in to comment