```
var redis = require('redis');
var http = require('http');
var myModule = require('./my_module');
var server = http.createServer(function (req, res) {
  myModule.something_that_uses_redis(req, redis, function(data) {
    res.end(data);
  });
});

```

Is it better to define `redis` outside the module and pass it in whenever needed or is it better to define it somewhere inside `myModule`? Will passing it as an argument cause some sort of unneeded stress or are both methods about the same?

Is there a best practice regarding this?

I'm re-writing an API that's unexpectedly receiving a huge number of requests and I'm trying to understand what types of things cause unnecessary processing.