nodejs open nfs files by inode (or a the fastest way to reopen a file)

I am currently writing a caching system that will hold serialized (json) data on disk and in memory in order to reduce I/O load on a database.

The system will work by holding the last X number of accessed files in memory and read other files from disk.

I have read that there are systems out there that reduce I/O load on nfs (which I may use in the future) systems by opening files by inode.

My questions are:

  1. Is there a way to open files on a nfs file system by inode in nodejs? If not, what homework would I need to do to make it happen?
    2. Is it absolutely impossible to open a file on a local file system by inode?
    3. if it is in fact impossible is there a faster way to reopen a file as it seems unnecessarily repetitive to have the OS stat the file over and over?

  1. No, there is no user-accessible way to open files by inode, because doing so would, in some cases, allow users to bypass filesystem ACLs.

  2. Yes. Same reason.

  3. Most competent NFS clients, including the Linux kernel, will cache stat results locally.