Tagged with "lua"

Photo by Michal Matlon

Streaming HTTP Response Output in OpenResty

In this video, I’ll demonstrate how to do streaming HTTP response body output in OpenResty. cd ~/ mkdir stream-resp/ cd stream-resp/ We create the sub-directory structure as always. Read more...

Photo by Andrik Langfield

Timing Lua Code Correctly in OpenResty

This tutorial demonstrates both the right ways and wrong ways of benchmarking user Lua code in OpenResty. cd ~ mkdir time-lua cd time-lua/ First of all, make sure our CPU is always at its full speed. Read more...

Photo by Gautam Ganguly

Share Data Across Requests Served by OpenResty

This tutorial will demonstrate how to share data across different HTTP requests served by an OpenResty application. cd ~/ mkdir data-share cd data-share/ mkdir conf logs lua tree We first prepare our test application’s directory tree. Read more...

Photo by Markus Spiske & Yichun Zhang

The resty Command-Line Utility Demo

In this tutroial, we will demonstrate how to use the resty command-line utility shipped with OpenResty. cd ~ export PATH=/usr/local/openresty/bin:$PATH which resty It’s usually in this path. Read more...

Photo by Gerry Roarty

Write Your Own Lua Modules for OpenResty Applications

Today I’d demonstrate how to write your own Lua modules in your OpenResty applications, step by step. Let’s put our simple OpenResty application in a new directory named test-module. Read more...

Photo by 2Photo Pots

Hello World HTTP Example in OpenResty

This tutorial demonstrates how to implement a “hello world” HTTP interface using OpenResty. First of all, we make sure we are using OpenResty’s nginx. Read more...

Photo by Guido Jansen

Introduction to Lua-Land CPU Flame Graphs

  • What is a Flame Graph
  • Simple Lua samples
  • Complicated Lua applications
  • Sampling overhead
  • Safety
  • Compatibility
  • Other types of Lua-land Flame Graphs