• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UPYUN's open source software for OpenResty development

upyun-resty

UPYUN's open source software for OpenResty development.

Table of Contents

What is UPYUN

What is OpenResty

OpenResty is a full-fledged web platform by integrating the standard Nginx core, LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways.

Tech Talks

201411 Beijing OSC

201511 Beijing OpenResty Con

201608 Guangzhou UPYUN OpenTalk

  • 基于 ngx_lua 的动态服务路由方案 (Slide) - @yejingx

201612 Shenzhen OpenResty Con

  • OpenResty 在云处理服务器集群中的应用 (Slide) - @yejingx

201712 Hangzhou OpenResty Meetup

  • OpenResty TCP 服务代理和动态路由 (Slide) - @huangnauh

  • OpenResty 项目性能优化实践 (Slide) - @tokers

201811 Hangzhou OpenResty Con

  • 又拍云 OpenResty/Nginx 服务优化实践 (Slide) - @tokers

201901 Shenzhen OpenResty x OpenTalk

  • OpenResty 动态流控的几种姿势 (Slide) - @timebug

201903 Beijing OpenResty x OpenTalk

  • OpenResty 在又拍云容器平台中的应用 (Slide) - @yejingx

Projects

Middleware

Project Slardar

Slardar is a HTTP load balancer based on Nginx and lua-nginx-module, by which you can update your upstream list and run lua scripts without reloading Nginx.

Nginx Modules

base64-nginx-module

This module allows for on-the-fly base64 encode. As same as the standard ngx_http_gzip_module.

zstd-nginx-module

Nginx module for the Zstandard compression.

Libraries

checkups

Manage Nginx upstreams in pure ngx_lua.

  • Periodically heartbeat to upstream servers
  • Proactive and passive health check
  • Dynamic upstream update
  • Balance by weighted round-robin or consistent-hash
  • Synchronize with Nginx upstream blocks
  • Try clusters by levels or by keys

httpipe

Lua HTTP client cosocket driver for OpenResty / ngx_lua, interfaces are more flexible.

  • HTTP 1.0/1.1 and HTTPS
  • Flexible interface design
  • Streaming reader and uploads
  • Chunked-encoding request / response body
  • Sets the timeout for read and send operations
  • Limit the maximum response body size
  • Keepalive

redis-ratelimit

This lua library is a request processing rate limit module for ngx_lua. It is used to limit the request processing rate per a defined key between multiple NGINX instances. The limitation is done using the "leaky bucket" method.

sync

This lua-resty library help you to synchronize data(from redis, mysql, memcached and so on) based on the version changes.

It will check the freshness by comparing the version cached by itself(stored in shared memory) and the one from your external suits, data will be updated when the cached one is stale or for the first time.

ctxdump

ngx.ctx is a magic table provided by ngx_lua, it can be used to store per-request Lua context data, however the lifetime is limited to the current location.

See this issue for the details.

This lua-resty library can help you to bypass this limitation, i.e. it stashes and applies the old ngx.ctx for avoiding being destoried after Nginx internal redirect happens.

consul

This Lua library can help OpenResty/ngx_lua users to load config from consul.

load

This Lua library can help OpenResty/ngx_lua users to dynamically load lua files/scripts.

requests

Yet Another HTTP library for OpenResty.

limit-rate

Lua module for limiting request rate for OpenResty/ngx_lua, using the "token bucket" method.

Community Contributions

slice filter and If-Range requests

The semantic of If-Range isn't implemented correctly when using nginx's slice module.

See here for the details.

autoindex module and request body

The autoindex module doesn't discard the request body explicitly,
hence request body will be treated as a pipelined request, and most of time another unexpected response will be sent to client.

See here for the details.

ngx.req.raw_header with single line break

When the header delimiter is \n(rather than \r\n),
ngx.req.raw_header cannot get the complete protocol headers in some case.

See here for the details.

ngx_lua and filter finalize problem

some ngx_lua's APIs(like ngx.flush) don't handle the nginx filter finalize correctly,
thus the Lua VM may raise some exceptions.

See here for the details.

segmentation fault might occur when SSL renegotiation happens

When the SSL/TLS handshake reuses a existing session and the connection upgrades to HTTP/2, segmentation fault might occur when SSL/TLS renegotiation happens.

This problem only happens under the specific Nginx and OpenSSL combinations.

See here for the details.

Work at UPYUN

More Repositories

1

slardar

Updating your upstream list and run lua scripts without reloading Nginx.
Lua
494
star
2

lua-resty-checkups

Manage Nginx upstreams in pure Lua.
Lua
259
star
3

upx

UPYUN Storage Command Tool
Go
193
star
4

php-sdk

UPYUN SDK for PHPer
PHP
176
star
5

Android-short-video

Android-short-video 是又拍云推出的一款适用于 Android 平台的短视频 SDK,它包含短视频拍摄、编辑、合成、上传,还包含短视频播放器,再结合又拍云存储和 CDN,您就可以开启您的短视频业务了。
Java
172
star
6

python-sdk

UPYUN Python SDK
Python
115
star
7

java-sdk

UPYUN Java SDK
Java
114
star
8

ios-live-sdk

UPYUN 直播 SDK。播放器、采集器、推流器统一集成,功能完备接口简练,可以快速安装使用。采集与音视频处理模块开源,灵活性强可以满足复杂定制需求。UPYUN 直播平台一站式服务:http://docs.upyun.com/live/
Objective-C
104
star
9

node-sdk

UPYUN SDK for JS(support browser and node.js)
JavaScript
95
star
10

android-player-sdk

UPYUN Android 流媒体播放器
Java
87
star
11

go-sdk

UPYUN Go SDK
Go
76
star
12

android-push-sdk

UPYUN Android 推流 SDK
Java
74
star
13

cafex

Cafex is a pure Elixir implementation of Kafka client
Elixir
69
star
14

wechat-sdk

又拍云微信小程序 SDK
JavaScript
69
star
15

lua-resty-limit-rate

Lua module for limiting request rate for OpenResty/ngx_lua, using the "token bucket" method.
Perl
68
star
16

docs

UPYUN Docs
CSS
66
star
17

android-sdk

UPYUN Android SDK
Java
51
star
18

ios-short-video

ios-short-video 是又拍云推出的一款适用于 iOS 平台的短视频 SDK,它包含短视频拍摄、编辑、合成、上传,还包含短视频播放器,再结合又拍云存储和 CDN,您就可以开启您的短视频业务了。https://www.upyun.com/products/short-video
Objective-C
51
star
19

node-upyun

UPYUN Node.js SDK !!!Deprecated
48
star
20

lua-resty-sync

Synchronizing data based on version changes
Lua
41
star
21

ios-form-sdk

UPYUN iOS SDK
Objective-C
37
star
22

ios-sdk

UPYUN iOS SDK
Objective-C
32
star
23

ruby-sdk

UPYUN Ruby SDK
Ruby
29
star
24

js-multipart-upload

HTML5 multipart-uploader demo
JavaScript
28
star
25

upyun.com

The next generation website
Vue
27
star
26

token-examples

Multilingual token generation example
JavaScript
19
star
27

upyun.github.io

UPYUN Engineering Blog
CSS
18
star
28

ueditor

Integrate UPYUN API to UEditor.
JavaScript
17
star
29

multipart-upload-android-sdk

multipart-upload-android-sdk
Java
15
star
30

discuz-plugin

UPYUN for discuz
PHP
13
star
31

node-av-pretreatment

音视频处理 SDK(Node.js)
JavaScript
11
star
32

c-sdk

UPYUN C SDK
C
10
star
33

js-form-api

表单 API,前端使用的简单 Demo
9
star
34

c-sharp-sdk

UPYUN C-Sharp SDK
C#
8
star
35

upyun-uss-script

Commonly used script for UPYUN Storage Service
Python
8
star
36

multipart-upload-php-sdk

又拍云分块上传 SDK !!! Deprecated
PHP
7
star
37

multipart-upload-ios-sdk

multipart-upload-ios-sdk
Objective-C
7
star
38

erlang-sdk

UPYUN Erlang SDK
Erlang
6
star
39

swift-sdk

又拍云 swift SDK
Swift
5
star
40

Android-QuickLogin

Java
4
star
41

ios-video-player

Objective-C
4
star
42

iOS-QuickLogin

Objective-C
4
star
43

umeditor-for-UPYUN

Integrated UPYUN API to umeditor
JavaScript
3
star
44

av-pretreatment-php-sdk

又拍云音视频预处理 PHP SDK !!! Deprecated
PHP
3
star
45

java-purge-sdk

JAVA version cache refresh for UPYUN
Java
2
star
46

ios-fusion-sdk

UPYUN 融合云 iOS SDK
Objective-C
2
star
47

utilgo

Some awesome go utils
Go
2
star
48

android-fusion-sdk

UPYUN 融合云 Android SDK
Java
1
star
49

carrot

UPYUN scoop packages
PowerShell
1
star
50

rust-sdk

1
star
51

gzjion

multi gz files merge to one
C
1
star