title: NestJs Architecture Question: Separating vendor http requests from user driven http requests
body: <p>TLDR:
  I want to make sure vendor requests are not blocking webserver processes that should be used for user facing requests, and would like to know the best way to do this.</p>
  <p>Details:
  I am building a <a href="https://docs.nestjs.com/" rel="nofollow noreferrer">NestJs</a> ticketing application that aggregates data from several different third party ticketing feeds, and displays some of this data to end users on our website.</p>
  <p>These third party feeds are quite large, change often, are very slow to respond, and need to go through some backend processing before the relevant data can be shown to the end user. Because of this, we are not hitting these feeds directly per user request, but are constantly running data sync jobs that are fetching data from the feeds and trying to keep a local database in sync with them. These feeds communicate over http and require a lot of requests (100k+ per hour)</p>
  <p>Meanwhile we have a user facing application that receives about 100k requests per day. I would like to architect the application so that I am making sure that the user facing data is easily available for the running web server and can handle traffic spikes, but also want to keep the application logic as a monolith as both user facing data and processing data share logic, and ease of development.</p>
  <p>I am thinking of setting up an instance of the app to handle user facing requests, and another instance of the app for running the data processing work via <a href="https://docs.nestjs.com/techniques/queues" rel="nofollow noreferrer">Nest Queues</a>. My questions are:</p>
  <ul>
  <li>Is this a good approach to the problem, or is there a better way of thinking about this?</li>
  <li>If this is a good approach, what is the best way to separate the two so that one responds to user requests while the other runs the data processing? Would I use env variables to decipher the current running applications responsibilities and then create the appropriate gaurds, etc., or some other way of directing what each app should do?</li>
  </ul>