开发者

Solr : replication options

开发者 https://www.devze.com 2023-04-10 10:26 出处:网络
I\'ve got a SOLR instance running behind a firewall. I\'m about to put up another instance 开发者_如何学Pythonwhich will not be firewalled. Howevever, SOLR appears to only support pull replication and

I've got a SOLR instance running behind a firewall. I'm about to put up another instance 开发者_如何学Pythonwhich will not be firewalled. Howevever, SOLR appears to only support pull replication and not push replication.

What are my options with regard to maintaining the same level of security? I'd rather not open too many ports in the firewall. Would HTTP over a SSH tunnel be the best option? Would it also be possible to just replicate the index files using plain old rsync (not using any SOLR specific features) or would this break something?


Would it also be possible to just replicate the index files using plain old rsync

Solr actually supports this kind of distribution with its snappuller mechanism, documented here: http://wiki.apache.org/solr/CollectionDistribution


I would open a port and specify the IP address of the slave, and just use ordinary HTTP-based replication; that would be quite secure, I think, and easier to maintain probably. I know it's not exactly where you were angling, but it's what I'd recommend.


I'm answering my own question as the solution i went for is different than what the two other answers suggested. I ended up using a SSH tunnel for HTTP traffic. Thus, i used SSH to redirect all traffic to port 8080 on the HostA to port 8080 on hostB through a SSH tunnel.

The solution appears to be working fine. I'm using a script which validates the tunnel every 5 minutes or so.


You could use HTTP basic authentication (see https://wiki.apache.org/solr/SolrReplication#Slave) but since the password will be passed in plain text, an SSH tunnel or secure VPN would also be required in order to deter more determined attackers.

I'll be going for a VPN solution to start with and consider an SSH tunnel before moving to production if we feel we are unable to place sufficient trust in our internal networks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号