惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CERT Recently Published Vulnerability Notes
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
Schneier on Security
Schneier on Security
T
Threatpost
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
T
Threat Research - Cisco Blogs
罗磊的独立博客
Security Latest
Security Latest
D
Docker
S
Secure Thoughts
博客园 - 聂微东
A
Arctic Wolf
Recorded Future
Recorded Future
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
P
Palo Alto Networks Blog
Project Zero
Project Zero
Blog — PlanetScale
Blog — PlanetScale
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Help Net Security
T
The Blog of Author Tim Ferriss
Latest news
Latest news
AWS News Blog
AWS News Blog
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
F
Full Disclosure
Martin Fowler
Martin Fowler
T
The Exploit Database - CXSecurity.com
Attack and Defense Labs
Attack and Defense Labs
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
小众软件
小众软件
宝玉的分享
宝玉的分享

Lua

用 Lua 写 Android 应用? AutoLua 做到了 - V2EX Android 上直接用 Lua 调 Java API 写脚本——AutoLua 技术分享 - V2EX 使用 Android Lua Helper 在 VSCODE 中调试安卓 Lua 应用 - V2EX skynet 怎么给 mysql drive 增加对 caching_sha2_password 的支持 - V2EX 奇怪的小问题 - V2EX Lua 代码上的优化,相互学习一下 - V2EX 求一份 lua 入门教程 - V2EX 有关 Lua 调用 C++ 编译动态库程序 - V2EX 飞书 + Lua 实现企业级组织架构登录认证 - V2EX 为什么游戏架构要用事件来驱动? - V2EX vscode 上写 lua 有显示注释的插件吗? - V2EX lua 为什么要使用~=当作不等于运算符? - V2EX 请问现在 lua 混淆用什么工具,求常年 lua 的老哥指点 - V2EX lua 的前景如何? - V2EX core_framework - 基于 libev 的轻量级 lua 网络开发框架 如何构建伪视频流服务? 低延时低采样, 基于 OpenResty , HTTP, 内网... TP-Link 官方使用的是开源固件? 表达过去、现在与将来:之将来(1) - V2EX 有个问题, lua 平时能用来做做什么 - V2EX ngx_lua 遇到的一个小坑 - V2EX Lua IDE 各位 V 友,用 lua 作为开发语言用什么 IDE 可以方便代码提示以及调试呢 - V2EX Lua 怎么实现 php strstr() 函数的功能 - V2EX 使用 Sol2 来进行 Lua 绑定 - V2EX luarocks 使用上的一些小技巧 - V2EX 正在用 lua 写一个 nginx 防盗链的拓展,遇到了一个问题。 - V2EX 9k-18k 宁波 经验 3-5 年 本科及以上 全职 职位诱惑 : 年终奖 出国旅游 顶级办公设备及环境 - V2EX 关于 Lua 的标准库 - V2EX Torch - V2EX 一个在 MediaWiki 里面加入 Lua 脚本的插件 - V2EX ngx_lua_reqstatus 实时监控 Nginx 域名 qps 的 lua 拓展 - V2EX 首页搜索到 14 个 python,现在应该是 15 个了,为神马没有 lua 一席之地 - V2EX 学习 ngx_lua - V2EX 用 Lua 写 Telegram 的 Bot - V2EX Lua 资料收集整理 - V2EX 云风翻译了 Lua 5.3 的手册 - V2EX 我对 Lua coroutine 的理解,希望有人能指点下有哪些更适合的使用场景或高阶用法~ - V2EX Lua 5.3 - V2EX 为什么 Lua 本身不包含像 endswith() 之类的特别常用的字符串函数呢? - V2EX 为 Atom 写了一个 linter-luacheck,希望大家喜欢 - V2EX lua 如何最快速度入门 - V2EX 学习 Lua,请问各位有什么书推荐? - V2EX lua 很牛啊,有人在服务端用 ta 么? - V2EX LÖVE - V2EX Scripting Nginx with Lua - V2EX 关于 openssl aes-256-cbc 的一些参数 - V2EX LuaJIT 2.1 PPA - V2EX 谁会Luci的cbi模块?怎样实现重启服务? - V2EX lua有没有3des加密解密的模块? - V2EX 关于学习 Lua 有什么好书推荐么? - V2EX lua好像有种简化的语法,叫啥来着 - V2EX
openresty + lua 这个地方怎么写 - V2EX
awanganddong · 2023-06-20 · via Lua

awanganddong

V2EX  ›  Lua

 

awanganddong · 2023 年 6 月 20 日 · 4068 次点击

这是一个创建于 1090 天前的主题,其中的信息可能已经有所发展或是发生改变。

lua-resty-upstream-healthcheck lua-resty-balancer

这两个插件是负载均衡和健康检测。组合到一块我不知道怎么写了。

    upstream webserver {
        server 127.0.0.1:12354;
        server 127.0.0.1:12355;
        server 127.0.0.1:12356 backup;
    }
    
  upstream webserver {
        server 127.0.0.1;
        balancer_by_lua_block {
            local b = require "ngx.balancer"
            local swrr_up = package.loaded.my_swrr_up

            -- Note that SWRR picks the first server randomly
            local server = swrr_up:find()
            assert(b.set_current_peer(server))
        }
   }