0

Our web servers (IIS 10) share a common database (SQL Server 2016). They poll some data from the database on a regular interval. When one of the web servers processes a request leading to a change in that data, it will update the database and its own data. But the other web server instances do not know of this data change, thus have old data until the next poll.

How should we instruct the other web server instances to update their data instantly?


Example:

  • Database table tblUserRoles stores all roles for all users.
  • Web servers poll this list once per day.
  • When the admin revokes a user's rights, the web server processing the request knows to update the database and its own UserRoleList immediately.
  • But how do the other web servers know to update their UserRoleList?

Possible Solution:

  • An internal service maintains a list of all active web server instances.
  • When a web server [A] processes a request that changes the data, it updates the database, updates its own data list and requests the active server list [B-Z].
  • Web server A invokes data list update for servers B-Z by calling each of them using an internal URL (e.g. /internal/update-user-roles)
  • Servers B-Z now update their data by polling data from the database.
2
  • Do the web servers each have their own copy of the database? Aug 17, 2020 at 20:52
  • No, the web servers use the same database on a separate server. But there's some data that they poll regularly (say once daily) and keep themselves (until the next poll) to save database requests. This question is about forcing web server instances to immediately poll for updated data. Aug 18, 2020 at 21:07

0

You must log in to answer this question.

Browse other questions tagged .