resty 命令行工具演示

2021-03-26
阅读 4 分钟
4.2k
[链接]在本教程中,我们将演示如何使用 OpenResty 附带的 resty 命令行工具。 {代码...} 一般都是这个路径。我们可以通过 -V 选项检查其版本号。 {代码...} 如果你使用我们预构建的 Linux 二进制包安装 OpenResty,那么你应该安装 openresty-resty 包。 {代码...} 因为它不在 openresty 主包中。比如用 resty 命令来做“h...
封面图

为 OpenResty 应用编写你自己的 Lua 模块

2021-03-24
阅读 3 分钟
5k
[链接]今天我就来演示一下如何在 OpenResty 应用中编写自己的 Lua 模块,一步一步来。让我们把我们简单的 OpenResty 应用放到一个新的目录中,命名为 test-module。 {代码...} 然后我们像往常一样创建子目录结构。 {代码...} 请注意,与上一篇教程中的“Hello World”示例不同,我们在这里创建了一个 lua/ 目录来存放我们...
封面图

使用 OpenResty 实现“你好世界” HTTP 示例

2021-03-23
阅读 3 分钟
3.5k
[链接]下面我将演示如何使用 OpenResty 实现一个“hello world”的 HTTP 接口。首先,我们要确保我们使用的是 OpenResty 的 nginx。 {代码...} 一般都是这个路径。然后我们进入 home 目录。 {代码...} 在我们的例子中,创建并切换到一个名为 hello 的目录。 {代码...} 为 OpenResty 应用程序创建模板子目录。 {代码...} 然...
封面图

Lua 级别 CPU 火焰图简介

2020-10-08
阅读 10 分钟
4.4k
在 OpenResty 或 Nginx 服务器中运行 Lua 代码如今已经变得越来越常见,因为人们希望他们的非阻塞的 Web 服务器能够兼具超高的性能和很大的灵活性。有些人使用 Lua 完成一些非常简单的任务,比如检查和修改某些请求头和响应体数据,而有些人则利用Lua 创建非常复杂的 Web 应用、 CDN 软件和 API 网关等等。Lua 以简单、...

Introduction to Lua-Land CPU Flame Graphs

2020-09-02
阅读 19 分钟
2.6k
Lua code running inside OpenResty or Nginx servers is very common nowadays since people want both performance and flexibility out of their nonblocking web servers. Some people use Lua for very simple tasks like modifying and checking certain request headers and response bodies while other people ...

Memory Fragmentation in OpenResty and Nginx Shared Memory Zones

2020-08-25
阅读 10 分钟
2.7k
Memory fragmentation is a common problem in computer systems though many clever algorithms have emerged to tackle it. Memory fragmentation wastes free memory blocks scattered in a memory region and these free blocks cannot be merged as a whole to serve future requests for large memory blocks or c...

OpenResty 与 Nginx 共享内存区的内存碎片问题

2020-08-24
阅读 5 分钟
2.6k
内存碎片是计算机系统中的一个常见问题,尽管已经存在许多解决这个问题的巧妙算法。内存碎片会浪费内存区中空闲的内存块。这些空闲的内存块无法合并成更大的内存区以满足应用未来对较大内存块的申请,也无法重新释放到操作系统用于其他用途1。这会导致内存泄露现象,因为对大块的内存申请越来越多,满足这些请求所需要的...

OpenResty 和 Nginx 的共享内存区是如何消耗物理内存的

2020-08-12
阅读 7 分钟
9.3k
OpenResty 和 Nginx 服务器通常会配置共享内存区,用于储存在所有工作进程之间共享的数据。例如,Nginx 标准模块 ngx_http_limit_req 和 ngx_http_limit_conn 使用共享内存区储存状态数据,以限制所有工作进程中的用户请求速率和用户请求的并发度。OpenResty 的 ngx_lua 模块通过 lua_shared_dict,向用户 Lua 代码提供...

How OpenResty and Nginx Shared Memory Zones Consume RAM

2020-08-11
阅读 15 分钟
4.6k
OpenResty and Nginx servers are often configured with shared memory zones which can hold data that is shared among all their worker processes. For example, Nginx's standard modules ngx_http_limit_req and ngx_http_limit_conn use shared memory zones to hold state data to limit the client request ra...

The Wonderland of Dynamic Tracing (Part 4 of 7)

2020-07-18
阅读 8 分钟
1.5k
This is Part 4 of the series "The Wonderland of Dynamic Tracing" which consists of 7 parts. I will keep updating this series to reflect the state of art of the dynamic tracing world.

The Wonderland of Dynamic Tracing (Part 3 of 7)

2020-07-17
阅读 11 分钟
2k
This is Part 3 of the series "The Wonderland of Dynamic Tracing" which consists of 7 parts. I will keep updating this series to reflect the state of art of the dynamic tracing world.

The Wonderland of Dynamic Tracing (Part 2 of 7)

2020-07-16
阅读 9 分钟
2k
This is the second part of the 7 part series "The Wonderland of Dynamic Tracing." This series will consist of updates on the state of art of the dynamic tracing world.

The Wonderland of Dynamic Tracing (Part 1 of 7)

2020-07-15
阅读 12 分钟
1.9k
This is the first part of the article "The Wonderland of Dynamic Tracing" which consists of 7 parts. I will keep updating this series to reflect the state of art of the dynamic tracing world.

The OpenResty 10-Year Community Report: OpenSource Projects

2020-07-14
阅读 4 分钟
1.8k
Over the years, OpenResty’s open source community has grown bit by bit right before our eyes. Casting our memories back to 2014, before OpenResty Inc. became a full-fledged company and was instead a seedling idea, we looked back at your involvements in OpenResty. Remembering the last half-decade ...

OpenResty 1.17.8.1 released

2020-07-13
阅读 2 分钟
1.4k
OpenResty 1.17.8.1, based on the Nginx 1.17.8 core, has been officially released.For the full announcement with a list of detailed changes, highlights, and testing, see here.Because of the miscellaneous security updates, we recommend all OpenResty users to upgrade to this version.A brief overview...

OpenResty 1.17.8.1 新版发布

2020-07-13
阅读 1 分钟
2.5k
基于 Nginx 1.17.8 核心的 OpenResty 1.17.8.1 正式发布。全部发布内容和详细修改、变更和测试相关的信息,参考这里。因为本版本包含很多安全更新,我们建议所有 OpenResty 用户升级到此版本。主要变更简介:所有官方 OpenResty 二进制使用的 OpenSSL 升级到了 1.1.1。这是是主线 OpenSSL 1.1.1 版本系列的最新版本。我...

OpenResty Inc. 锁定四百万融资,领先流量管理软件同时发布实时诊断新品

2020-06-03
阅读 1 分钟
2.3k
OpenResty Inc. 在 2020 年 4 月 20 日完成了 Sphere 5200 领投的 A 轮融资———丝毫没有受到 Covid-19 疫情的影响。OpenResty Inc. 是一个开发针对 web 应用的性能、可靠性和安全性进行智能分析工具的公司。自 2017 年成立以来,已经获得了超过 400 万美元的资金。

动态追踪技术漫谈

2020-02-15
阅读 19 分钟
11.9k
我很高兴能在这里和大家分享动态追踪技术(Dynamic Tracing)这个主题,对我个人来说也是一个很激动人心的话题。那么,什么是动态追踪技术呢?

OpenResty 和 Nginx 如何分配和管理内存

2020-02-02
阅读 5 分钟
12.2k
OpenResty® 开源 Web 平台以 高 性能 和 低 内存占用著称。我们有一些用户甚至在嵌入式系统中运行复杂的 OpenResty 应用,比如机器人。也有一些用户在把他们的应用从其他技术栈(比如 Java,NodeJS 和 PHP)迁移到 OpenResty 之后,观察到内存使用量上的显著下降。然而,有时候我们还是需要优化某些 OpenResty 应用的内...

How OpenResty and Nginx Allocate and Manage Memory

2020-02-02
阅读 11 分钟
4.2k
Our OpenResty® open source web platform is known for its high execution speed and also small memory footprint. We have users running complex OpenResty applications inside embedded system devices like robots. And people have been observing significant memory usage reduction when they migrate appli...