Skip to content

Instantly share code, notes, and snippets.

@elvisNg
elvisNg / gist:22a3236a987708a8c4574d7a8b237d2d
Created February 2, 2018 07:22
搭建redis+Nginx+keepalived+sentinal 实现session共享负载均衡
Download-NGINX:http://nginx.org/en/download.html
Download-Keepalived:http://www.keepalived.org/download.html
Download-regis:https://redis.io/download
@elvisNg
elvisNg / gist:e729d3e0a4e30972a169451e3d0ef268
Last active February 2, 2018 03:39
HttpClient解决并发不足导致交易掉单问题
主要解决金融上游并发不足的问题:
此处分为公有和私有连接池:
私有连接池:
注:首先要在static静态池中放一个存储http连接池的Map
private final static Map<String,PoolingHttpClientConnectionManager> ClientPoolMap = new HashMap<String,PoolingHttpClientConnectionManager>();
/**