随笔分类 -  http2及超时

1 2 下一页

http长连接维护 【yet】
摘要:。 阅读全文

posted @ 2025-10-07 22:22 silyvin 阅读(10) 评论(0) 推荐(0)

tcp(netty)的调用同步化(异步阻塞)及与http协议、浏览器关系【重点】(二)http2会不会沾拆包乱序?
摘要:不会。 报文经过封包后(内含requestid)调用socket.write,操作系统、会确保这一整个包进协议栈是个原子过程,即其他write无法插包进来影响客户端的协议解析 接下去就交给操作系统对tcp协议有序性的实现 但是有序性无法100%保障 比如2个request,socker.write时 阅读全文

posted @ 2025-08-22 00:45 silyvin 阅读(10) 评论(0) 推荐(0)

httpclient验证证书源码以及忽略证书校验的两种方式
摘要:https://segmentfault.com/a/1190000042062501 Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 阅读全文

posted @ 2025-03-28 20:18 silyvin 阅读(254) 评论(0) 推荐(0)

客户端没设置timeout及rst
摘要:客户端请求,服务器已经无响应 客户端block 服务器restart,linux kill connection and send RST 客户端connection reset,证明客户端在读,服务器tomcat仍然接受了连接,所以最应当设置socket timeout 如果对方服务器没启动,会直 阅读全文

posted @ 2025-02-14 20:01 silyvin 阅读(19) 评论(0) 推荐(0)

什么是 read timeout【重要】
摘要:SocketTimeout - Defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data or, put differently, a maximum peri 阅读全文

posted @ 2023-07-31 17:31 silyvin 阅读(80) 评论(0) 推荐(0)

Netty 作为 http client 请求https 的 get与post(二)双向ssl
摘要:接 Netty 作为 http client 请求https 的 get与post , package com.example.demo;import io.netty.bootstrap.Bootstrap;import io.netty.buffer.ByteBuf;import io.nett 阅读全文

posted @ 2023-07-17 22:26 silyvin 阅读(408) 评论(0) 推荐(0)

代理服务器httpclient未设置超时
摘要:0 背景: netty(二十四)http代理服务器(三)fiddler【重点】之后,在换了台电脑了,发现还是会访问10几个网页后出页面速度变慢,最终卡死 发现有16个连接的差 这里已经猜猜有对外请求阻塞了,而消息队列的并发数为10 jstack后果然发现10个线程卡在对外请求中,即是对谷歌服务器的请 阅读全文

posted @ 2022-12-11 22:36 silyvin 阅读(107) 评论(0) 推荐(0)

java代理服务器的方式(转)
摘要:https://www.cnblogs.com/langtianya/p/4026102.html 使用Java的HttpURLConnection类可以实现HttpClient的功能,而不需要依赖任何其他类库。所有有时候大家就直接使用它来完成一些简单(或复杂)的功能。但是你活在伟大的{print 阅读全文

posted @ 2022-10-02 22:50 silyvin 阅读(1035) 评论(0) 推荐(0)

各种超时归纳整理
摘要:如果不设置超时,连接会一直占用本地线程,端口,连接客户端一多,阻塞在那里,会导致本地端口用尽及CPU压力 netty /** * ******************************************************************* * 如果不设置超时,连接会一直占用 阅读全文

posted @ 2020-02-27 12:40 silyvin 阅读(673) 评论(0) 推荐(0)

http协议长连接的粘拆包(短链接没有处理沾包的问题,但是会有何时并包的问题)【重点】
摘要:netty pb协议设计(jds)【重点】 有netty对http协议长连接粘拆包的概念清晰的处理实践 21-ahttpclient 与TIME_WAIT 客户端close与服务端close 有对http 长连接包长度的理论处理方式的讨论-chunked,content-lenth 24netty( 阅读全文

posted @ 2020-01-15 17:00 silyvin 阅读(1223) 评论(0) 推荐(0)

25一次http完整流程【yetdone】
摘要:https://mp.weixin.qq.com/s/263-00PbiDrUdLQJBOt_7Q https://www.cnblogs.com/pigpdong/p/10899800.html https://www.cnblogs.com/zafu/p/7698361.html 地址解析 ur 阅读全文

posted @ 2019-12-29 19:29 silyvin 阅读(367) 评论(0) 推荐(0)

21Why httpclient is recommended to go with a connection pool in server-to-server request?
摘要:Why httpclient is recommended to go with a connection pool in server-to-server request? Besides performance improvement with absence of connection and 阅读全文

posted @ 2019-12-20 11:02 silyvin 阅读(318) 评论(0) 推荐(0)

21-chttp连接池该取多大
摘要:http://www.sohu.com/a/342596009_120054825 netstat 查看过多的TIME_WAIT 0 经常出现Address already in use (Bind failed)的问题。很明显是一个端口绑定冲突的问题,于是大概排查了一下当前系统的网络连接情况和端口 阅读全文

posted @ 2019-12-17 16:38 silyvin 阅读(675) 评论(0) 推荐(0)

21-ahttpclient 与TIME_WAIT 客户端close与服务端close
摘要:一 https://www.cnblogs.com/dadonggg/p/8778318.html 1、 time_wait的作用: 2、大量TIME_WAIT造成的影响: 在高并发短连接的TCP服务器上,当服务器处理完请求后立刻主动正常关闭连接。这个场景下会出现大量socket处于TIME_WAI 阅读全文

posted @ 2019-12-03 14:07 silyvin 阅读(752) 评论(0) 推荐(0)

a problem to pack jar with maven assembly and shade plugin
摘要:the problem appears when I package the jar file in a jetty and jersey project following the reference :maven 打jar包依赖问题 1 In idea, an http procedure wi 阅读全文

posted @ 2019-11-22 14:29 silyvin 阅读(344) 评论(0) 推荐(0)

pb协议 jdk序列化协议
摘要:1 pb协议 协议由序列化容量,jdk pb json kryo server: 使用spring boot 这两个bean告诉springboot,使用pb序列化 client: 参考:https://blog.csdn.net/u013219624/article/details/8315280 阅读全文

posted @ 2019-11-19 22:00 silyvin 阅读(668) 评论(0) 推荐(0)

tcp(netty)的调用同步化(异步阻塞)及与http协议、浏览器关系【重点】
摘要:1 https://segmentfault.com/a/1190000019152276?utm_medium=referral&utm_source=tuicool 其实在编程领域,异步的场景还是挺多的,比如 TCP 协议本身就是异步的,我们工作中经常用到的 RPC 调用,在 TCP 协议层面, 阅读全文

posted @ 2019-09-11 14:45 silyvin 阅读(3582) 评论(0) 推荐(0)

一次简单的 HTTP 调用,为什么时延这么大?抓个包分析下
摘要:http://www.disheng.tech/blog/简单的-http-调用为什么时延这么大/ https://mp.weixin.qq.com/s?__biz=MzIwMzY1OTU1NQ==&mid=2247486657&idx=1&sn=842a430a5e86a414658ef63dd8 阅读全文

posted @ 2019-07-14 19:46 silyvin 阅读(1660) 评论(0) 推荐(1)

3+再议get与post区别(nagle+delayed ack)
摘要:https://mp.weixin.qq.com/s?__biz=MzUzMTA2NTU2Ng==&mid=100002489&idx=5&sn=b5d364d6150336b8c523041732b00173&chksm=7a4975084d3efc1eba31f375b4c08670a2594e 阅读全文

posted @ 2019-02-23 22:24 silyvin 阅读(188) 评论(0) 推荐(0)

当 HTTP 连接池遇上 KeepAlive 时
摘要:https://mp.weixin.qq.com/s?__biz=MzUzMTA2NTU2Ng==&mid=2247485891&idx=2&sn=82dd4786e38e23a10fa9210745c99130&chksm=fa497672cd3eff64fb06873ba909140f6f839 阅读全文

posted @ 2019-01-05 12:57 silyvin 阅读(888) 评论(0) 推荐(0)

1 2 下一页