blocking SSL server using Thrift
Thrift provides several different non-blocking server models, like TNonblockingServer
, THsHaServer
, and TThreadedSelectorServer
. But, I'd like to enable SSL
on the server. It seems SSL only works on blocking servers in Thrift.
Anyone has any clues of a non-blocking SSL server in Thrift? Java example would be highly appreciated.
One alternative to worrying about SSL in your Java App is to stand up something like nginx (http://wiki.nginx.org/SSL-Offloader) as a reverse proxy.
This has the upside of your application not needing to care about SSL but does require one more layer in your stack.
Clients will connect to the nginx server instead of directly to your client and nginx will forward those connections to your Thrift server.
You don't necessarily need two different servers for this approach, just configure your Thrift server to only listen on localhost (127.0.0.1 for ipv4) and have nginx listen on your external interfaces and forward to localhost.
Edit: client -> server in last paragraph
链接地址: http://www.djcxy.com/p/63988.html上一篇: JUnit可选/必需的测试
下一篇: 使用Thrift阻止SSL服务器