JuliaCon 2025

Julia in Nginx
2025-07-24 , Cathedral Room 324 - Else Room

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 Julia C module and what I've learned while working on this. We will also take a look at some examples of using the julia plugin to do basic operations on HTTP requests and responses.

Hello! I am Nishanth. I work at JuliaHub where I develop Cloud based solutions for hosted Julia applications.