2025-07-24 –, Main Room 5
Nginx is a popular, high performance web server and reverse proxy. The OpenResty project combines nginx and LuaJIT enabling programmers to extend nginx with the Lua programming language. Like Lua, Julia also has a C API and JIT compiler. Using the Julia C API, we created a Julia nginx extension that can be used to run Julia code inside nginx. This is a fun experiment in the realm of julia embedded development.
The OpenResty project, which combines the nginx web server with LuaJIT, is a very popular web platform for building web based applications like web gateways, proxies, web application firewalls (WAF) etc. The dynamic nature of the Lua programming language is what makes the system expressive and powerful. Since Julia is also capable of being embedded and JIT compiled, we came up with the idea of writing a Julia extension module for nginx. This enables us to use Julia and its vast library of packages inside nginx, replacing logic which would otherwise be written in Lua.
In this talk we will go over the implementation of the nginx embedded Julia C module. We will also take a look at of the supporting Julia packages for session handling, authentication tokens, headers, caching etc. We will briefly go over an example of setting up a web gateway in nginx with request processing and logic written in Julia code.
Hello! I am Nishanth. I work at JuliaHub where I develop Cloud based solutions for hosted Julia applications.