title: Display real time data on website that scales?
body: <p>I am starting a project where I want to create a website which will display LIVE flight information and status. We all have seen this at airport. An example is given here - <a href="http://www.computronics.biz/productimages/prodairport4.jpg" rel="nofollow noreferrer">http://www.computronics.biz/productimages/prodairport4.jpg</a>. As you can see this information <strong>changes continuously</strong>. The website will talk to a backend api and the this backend api will talk to <strong>database</strong>. Now the important part is that the flight information in the <strong>database</strong> will be updated by the airline itself. There could be several airlines and they will update their data respectively. I have drawn a diagram and uploaded here - <a href="https://imgur.com/a/ssw1S" rel="nofollow noreferrer">https://imgur.com/a/ssw1S</a>.</p>
  
  <p>Now those airlines will obviously have an interface (website talking to some backend API) through which they will update the database.</p>
  
  <p>Now here is my attempt to solve it. We need to have some sort of trigger such that if any airline updates a flight detail in the database between current time - 1 hour to current + 4 hours (website will only display few hours of flights), we need to call the web api and then send the update to the website in the real time. <strong>The user must not refresh the page at all.</strong> At the same time the website needs to scale well i.e. if 1 million users are on the website, and there is an update in the database in the correct time range, all 1 million user's website should get updated within a decent amount of time.</p>
  
  <p>I did some research and it looks like we need to have an event based approach. For example - we need to create a function (AWS lambda or Azure function) that should be called whenever there is an update in the database (Dynamo DB for example) within the correct time range. This function then should call an API which should then update the website through web socket technology for example. </p>
  
  <p>I am not looking for any code but just some alternative suggestions on how this can be solved in a scalable way. Also how do we test scalability?</p>