Lua and HTTP2: Is there an API for HTTP2 features?

640 views
Skip to first unread message

martin.k...@seekda.com

unread,
Jan 12, 2016, 11:15:43 AM1/12/16
to openresty-en
Hi folks!

I'm looking for documentation on how to utilize some HTTP2 features within Lua scripts in Nginx.

In short I want to dynamically create streams and decide during runtime what files to send through which stream.

Maybe I have looked in the wrong places but I couldn't find anything on the topic.

Do you have any pointers for me?

Best regards,
Martin

Yichun Zhang (agentzh)

unread,
Jan 12, 2016, 2:22:04 PM1/12/16
to openresty-en
Hello!

On Tue, Jan 12, 2016 at 8:15 AM, <martin.k...@seekda.com> wrote:
> I'm looking for documentation on how to utilize some HTTP2 features within
> Lua scripts in Nginx.
>
> In short I want to dynamically create streams and decide during runtime what
> files to send through which stream.
>
>

No such HTTP2 API for Lua in OpenResty yet. You're welcome to do
research and contributions in this field. AFAIK, the HTTP2
implementation in the NGINX core is as hacky as the original SPDY one
since it was done as an afterthought. So it might be a bit tricky to
extend and control.

Best regards,
-agentzh

martin.k...@seekda.com

unread,
Jan 13, 2016, 5:21:35 AM1/13/16
to openresty-en
Hi,

thanks for the reply even though it's a bummer :-(

The last time I seriously worked with C code was in 2007 and it was for an embedded device ...

But, let's give it a try :-)

Are there any pointers on how to get started with extending the Lua module and how the HTTP2 module works from a developer POV?

Best regards,
Martin

I know a bit C so I could give it a try. 

Yichun Zhang (agentzh)

unread,
Jan 13, 2016, 1:43:04 PM1/13/16
to openresty-en
Hello!

On Wed, Jan 13, 2016 at 2:21 AM, martin.keiblinger wrote:
> Are there any pointers on how to get started with extending the Lua module
> and how the HTTP2 module works from a developer POV?
>

The source code is the best place to get enlightened :)

For HTTP2 implementation questions, you can ask directly on the
nginx-devel mailing list. And for ngx_lua module's side, just ask
here. BTW, please try hard before asking a question, otherwise your
question may get ignored ;)

Thanks!

Best regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages