wangfuyu / hello-world

Just say hello.
0 stars 0 forks source link

Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? #3

Open muyiwq opened 3 years ago

muyiwq commented 3 years ago

I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。

wangfuyu commented 3 years ago

I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。

不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。

muyiwq commented 3 years ago

非常感谢您的回复。我想咨询一下您这边只用的http的客户端吗?您这边尝试过非http的客户端吗?您在使用的过程中用到多线程了吗?您这边是怎么使用多线程lsquic的?目前我需求客户端想发送大量的短链接。。。

      我尝试过同一引擎下,一个线程prog_run();另一个线程负责添加新连接,但是会报各种莫名其妙的错误。加上evthread_use_pthreads(),也是无效的,我问lsquic的问题区回复:据我目前了解到的lsquic客户端每个线程拥有一个引擎,围绕这个引擎处理所有的连接。但是现在这个不符合我的需求,没有办法在需要创建短链接的时候再创建连接。。。您是如何使用同一引擎多线程客户端的?

     我现在创建大量短链接的方式是一个线程池,(相当于整个客户端加锁了,不加锁,或者锁粒度小都会报各种错误或问题,或者不加锁把全局变量或者static变量声明为thread_local也是各种问题)相当于每个线程有自己的一个引擎,创建一个连接,还不能同时存在多个引擎,在本机测试大量10000+连接发送都正常,但是在公网环境下大量发送短连接,说不准阻塞在哪个连接上,会阻塞在prog_run(),这个里面没有完成握手,无法正常建立流,也不超时结束,附截图。您在公网环境测试过吗?我的用法是错的吗?

    如果您能指导我一下,不胜感激。祝好。。。

周六占用您时间很不好意思,如果您什么时候任何时间方便的话可以指导一下吗?我微信手机15510125104。。。

------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.**@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3)

I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。

不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

muyiwq commented 3 years ago

公网的不通大概率是网络的问题,我找到了问题可以不阻塞了,可以触发关闭连接超时的操作了。        但是我这边无法使用多线程同时建立多个引擎连接(1:1),必须对整个客户端加锁才可以正常发送,多线程相当于同时单线程同时操作一个引擎,不加锁,或者粒度小,源码有些位置加锁,都会有各种问题,您是怎么使用多线程操作lsquic的?

------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.**@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3)

I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。

不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wangfuyu commented 3 years ago

公网的不通大概率是网络的问题,我找到了问题可以不阻塞了,可以触发关闭连接超时的操作了。        但是我这边无法使用多线程同时建立多个引擎连接(1:1),必须对整个客户端加锁才可以正常发送,多线程相当于同时单线程同时操作一个引擎,不加锁,或者粒度小,源码有些位置加锁,都会有各种问题,您是怎么使用多线程操作lsquic的? ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.**@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。 不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

  1. 我主要是用lsquic实现QUIC server能力,包括标准HTTP3和QUIC私有协议。
  2. 我采用的是多进程模式,非多线程。 lsquic有部分代码是不支持多线程的,可能需要自己改造。
muyiwq commented 3 years ago

非常感谢您的回复!!       lsquic连接/流层次非线程安全,多线程我这边确实碰到很多问题难以解决。我想听从您的建议,转换思路实现多进程。       您这边客户端是怎么实现的?是怎么发送的主要是http3的请求吗?也是多进程的模式吗?客户端和服务端都是lsquic实现的吗? 您的服务端多进程是通过进程池实现的,还是通过nginx实现的?客户端或者服务端可以给个多进程的指导思路吗?       我简单安装测试过quiche和msquic还有mvfst,感觉lsquic手册比较清晰,跨平台比较多,整体感觉还比较合适,可能我能力有限,都有各自挺多问题的。。

------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月7日(星期一) 上午10:20 @.>; @.**@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3)

公网的不通大概率是网络的问题,我找到了问题可以不阻塞了,可以触发关闭连接超时的操作了。        但是我这边无法使用多线程同时建立多个引擎连接(1:1),必须对整个客户端加锁才可以正常发送,多线程相当于同时单线程同时操作一个引擎,不加锁,或者粒度小,源码有些位置加锁,都会有各种问题,您是怎么使用多线程操作lsquic的? … ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。 不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我主要是用lsquic实现QUIC server能力,包括标准HTTP3和QUIC私有协议。

我采用的是多进程模式,非多线程。 lsquic有部分代码是不支持多线程的,可能需要自己改造。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wangfuyu commented 3 years ago

非常感谢您的回复!!       lsquic连接/流层次非线程安全,多线程我这边确实碰到很多问题难以解决。我想听从您的建议,转换思路实现多进程。       您这边客户端是怎么实现的?是怎么发送的主要是http3的请求吗?也是多进程的模式吗?客户端和服务端都是lsquic实现的吗? 您的服务端多进程是通过进程池实现的,还是通过nginx实现的?客户端或者服务端可以给个多进程的指导思路吗?       我简单安装测试过quiche和msquic还有mvfst,感觉lsquic手册比较清晰,跨平台比较多,整体感觉还比较合适,可能我能力有限,都有各自挺多问题的。。 ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月7日(星期一) 上午10:20 @.>; @.**@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) 公网的不通大概率是网络的问题,我找到了问题可以不阻塞了,可以触发关闭连接超时的操作了。        但是我这边无法使用多线程同时建立多个引擎连接(1:1),必须对整个客户端加锁才可以正常发送,多线程相当于同时单线程同时操作一个引擎,不加锁,或者粒度小,源码有些位置加锁,都会有各种问题,您是怎么使用多线程操作lsquic的? … ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。 不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. 我主要是用lsquic实现QUIC server能力,包括标准HTTP3和QUIC私有协议。 我采用的是多进程模式,非多线程。 lsquic有部分代码是不支持多线程的,可能需要自己改造。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

  1. lsquic只是有部分资源(SSL上下文)非线程安全,连接、流这些资源是线程安全的。
  2. 客户端,您可以直接参考http_client和echo_client实现自己想要的客户端。
  3. 服务端,可以参考litespeed webserver实现,这是litespeed内部自己基于lsquic实现的server,支持QUIC。
  4. 多线程或多进程,基于lsquic实际上都可以,就看自己平台是否有其它瓶颈,以及lsquic中潜在的问题是否有能力处理。
  5. 选择QUIC库,不能简单从入手难易程度做决策吧? 看看自己平台需要什么,哪些是需要开源QUIC库必备的,哪些是可以自己实现的,在未来的应用场景中能否满足平台需求……

话说,您是哪家公司的? 还是就自己玩玩而已?

muyiwq commented 3 years ago

我是新入职一家教育公司,在直播方面的,有将近3个月了,让我一个人调研quic,跟原项目场景对比测试,我熟悉quic就2个多月,lsquic有一个多月,0rtt,连接迁移这些大坑,可能我能力不够,开源库落地都有问题,这些大坑更没头绪了,感觉试用期过不了了,我自己感觉有点做不动了,关键没人交流指导,好像就让我自己先趟趟路啊。。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年6月8日(星期二) 上午10:12 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3)

非常感谢您的回复!!       lsquic连接/流层次非线程安全,多线程我这边确实碰到很多问题难以解决。我想听从您的建议,转换思路实现多进程。       您这边客户端是怎么实现的?是怎么发送的主要是http3的请求吗?也是多进程的模式吗?客户端和服务端都是lsquic实现的吗? 您的服务端多进程是通过进程池实现的,还是通过nginx实现的?客户端或者服务端可以给个多进程的指导思路吗?       我简单安装测试过quiche和msquic还有mvfst,感觉lsquic手册比较清晰,跨平台比较多,整体感觉还比较合适,可能我能力有限,都有各自挺多问题的。。 … ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月7日(星期一) 上午10:20 @.>; @.@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) 公网的不通大概率是网络的问题,我找到了问题可以不阻塞了,可以触发关闭连接超时的操作了。        但是我这边无法使用多线程同时建立多个引擎连接(1:1),必须对整个客户端加锁才可以正常发送,多线程相当于同时单线程同时操作一个引擎,不加锁,或者粒度小,源码有些位置加锁,都会有各种问题,您是怎么使用多线程操作lsquic的? … ------------------ 原始邮件 ------------------ 发件人: "wangfuyu/hello-world" @.>; 发送时间: 2021年6月4日(星期五) 晚上9:21 @.>; @.@.>; 主题: Re: [wangfuyu/hello-world] Dear sir, lsquic issues You are using lsquic, can I ask you questions about lsquic 0rtt? (#3) I have learned that lsquic seems to only support gquic's non-http_client support 0-rtt, how did you implement gquic 0-rtt here? I set the gquic version here, and I cannot generate a gquic client. lsquic_gquic_full_conn_client_new() reports an error could not create enc session. How did you implement gquic 0-rtt here? Can you give me some suggestions? Can you give me your example? I am also Chinese, looking forward to your reply? A good person lives in peace。。 不好意思,刚看到这条信息。 GQUIC的客户端,lsquic本身编译就有http_client可以使用。 http_client同时支持GQUIC和IQUIC,只是当前IQUIC请求0RTT选项不生效而已。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. 我主要是用lsquic实现QUIC server能力,包括标准HTTP3和QUIC私有协议。 我采用的是多进程模式,非多线程。 lsquic有部分代码是不支持多线程的,可能需要自己改造。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lsquic只是有部分资源(SSL上下文)非线程安全,连接、流这些资源是线程安全的。 2)客户端,您可以直接参考http_client和echo_client实现自己想要的客户端。 3)服务端,可以参考litespeed webserver实现,这是litespeed内部自己基于lsquic实现的server,支持QUIC。 4)多线程或多进程,基于lsquic实际上都可以,就看自己平台是否有其它瓶颈,以及lsquic中潜在的问题是否有能力处理。 5)选择QUIC库,不能简单从入手难易程度做决策吧? 看看自己平台需要什么,哪些是需要开源QUIC库必备的,哪些是可以自己实现的,在未来的应用场景中能否满足平台需求……

话说,您是哪家公司的? 还是就自己玩玩而已?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wangfuyu commented 3 years ago

我是新入职一家教育公司,在直播方面的,有将近3个月了,让我一个人调研quic,跟原项目场景对比测试,我熟悉quic就2个多月,lsquic有一个多月,0rtt,连接迁移这些大坑,可能我能力不够,开源库落地都有问题,这些大坑更没头绪了,感觉试用期过不了了,我自己感觉有点做不动了,关键没人交流指导,好像就让我自己先趟趟路啊。。

照这么说,其实你并不需要去实现QUIC SERVER,需要的只是QUIC CLIENT。 1)服务端,直接用开源现成的或者从各大云厂商买个服务,直接跑起来,就可以测试。 2)客户端,基于chrom quiche库或者lsquic库实现都可以,且都有开源的client可以参考,也不涉及多进程多线程问题,不是?