title: How to make setInterval running on background?
body: <p>I have this function and it's called during my node server starts up in index.js file. In the init function, it sets <code>setInterval</code> to call <code>refreshKeyValues</code> periodically which takes about 10 sec.
  I ran some tests and sent a health check (simple get call to health end point returning 200 ok) and it seemed that the health check blocked when <code>refreshKeyValues</code> was running. 
  Is <code>setInterval</code> blocking? How do I make this refreshing logic running on background so that it won't block the incoming requests?</p>
  
  <pre><code>export default function initMyClient(server) {
    server.clients.myclient = MyClient.createNewClient();
    server.clients.myclient.init();
    server.keyValues = getKeyValues();
    function refreshKeyValues() {
      server.keyValues = getKeyValues();
    }
    const refreshInterval = setInterval(
      refreshKeyValues,
      1000
    );
    server.on('close', function onClose() {
      clearInterval(refreshInterval);
    });
  }
  </code></pre>