Forum Discussion
iRules LX limitations due to /var mounted with noexec flag
- Aug 10, 2017
Dealing with module installation in general I have a few questions. I have never used the sqlite3 module for node, but is it by chance a compiled module? Is so, BIG-IP does not include a complier so they cant be used if they have binaries that need to be built. Another question is if the sqlite3 module has a version compatible with 0.12.x (which is the version of node for iRules LX right now)?
Now as far as using sqlite in ILX, I would recommend against it for a number of reasons. First, is that using the file system from Node.js (which is where the DB file is kept for SQLite) on the BIG-IP is not a recommended or supported practice and could be detrimental to your platform or even to the app operation. Please see this solution article for more details - K16221101: Overview of iRules LX properties and limitations
The second is that it would only allow your plugin to run in Single concurrency mode (1 Node process for the whole BIG-IP) and you could never run it in Dedicated mode (one node process per TMM) because SQLite does not handle multiple processes using the DB file very well.
I would recommend that you use an external DB server with the appropriate NPM module. Another option you could use if you BIG-IP is version 13.0 is the ILXTable class, but this is only compatible with running your LX plugin in streaming mode (more precisely, it can only be used if you pass it an ILXFlow instance which is only available in the context of the ILXPlugin "connect" event emitter listener).
Dealing with module installation in general I have a few questions. I have never used the sqlite3 module for node, but is it by chance a compiled module? Is so, BIG-IP does not include a complier so they cant be used if they have binaries that need to be built. Another question is if the sqlite3 module has a version compatible with 0.12.x (which is the version of node for iRules LX right now)?
Now as far as using sqlite in ILX, I would recommend against it for a number of reasons. First, is that using the file system from Node.js (which is where the DB file is kept for SQLite) on the BIG-IP is not a recommended or supported practice and could be detrimental to your platform or even to the app operation. Please see this solution article for more details - K16221101: Overview of iRules LX properties and limitations
The second is that it would only allow your plugin to run in Single concurrency mode (1 Node process for the whole BIG-IP) and you could never run it in Dedicated mode (one node process per TMM) because SQLite does not handle multiple processes using the DB file very well.
I would recommend that you use an external DB server with the appropriate NPM module. Another option you could use if you BIG-IP is version 13.0 is the ILXTable class, but this is only compatible with running your LX plugin in streaming mode (more precisely, it can only be used if you pass it an ILXFlow instance which is only available in the context of the ILXPlugin "connect" event emitter listener).
Hi Eric, Thanks for your thoughts on this matter. As you mentioned it isn't a good practice to perform filesystem actions from ILX, so I dropped the requirement for sqlite3 for my project. Instead I searched for a in-memory database solution and found lokijs. This module can be used without storing the database to disk. I'll check out the ILXTable class.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com