Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-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.

like image 430
ruichuan Avatar asked Sep 24 '12 15:09

ruichuan


1 Answers

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

like image 160
Bryan Avatar answered Oct 14 '22 17:10

Bryan