英文:
ElasticSearch Golang
问题
使用elastigo库是否可以识别多个主机?我似乎找不到相关的信息。有人在生产环境中使用elastigo吗?我真的很想尝试使用基于Go的应用程序来处理我们的Web服务,但我们对ElasticSearch、Redis和可能还有其他一些要求。只是不确定Go的驱动程序是否已经准备好了。
如果有任何建议/信息,将不胜感激。
谢谢,
S
英文:
Is it possible to identify multiple hosts with elastigo? I can't seem to find anything specific to that. Anyone using elastigo in a PROD setting? I would really like to attempt using a go based app for our web services, but we have a requirement with ElasticSearch, Redis and possibly a few others. Just not sure that the drivers for go are ready yet.
Any suggestions / info would be appreciated.
Thanks,
S
答案1
得分: 5
我的答案可能有点晚,但是...我最近(2016年中)选择了olivere/elastic作为我们生产应用程序的Elasticsearch Go客户端,而不是选择elastigo。
选择的原因如下:
- olivere/elastic在过去一年里一直在积极开发,而elastigo的更新频率越来越低。
- 截至2016年,开发者在互联网上更多地推荐使用olivere/elastic。
如果你还没有做出决定,我强烈建议你看一下olivere/elastic。此外,还有一篇博文在Go中使用Elasticsearch,演示了如何使用olivere/elastic来索引和搜索文档的示例代码。(以便你了解代码的样子)
英文:
My answer could be a bit late, but still... I have recently (mid 2016) chosen olivere/elastic over elastigo as Elasticsearch Go client for our production application.
Reasons for the choice were:
- olivere/elastic is under active development for the last year, while elastigo gets updated less and less regularly
- As of 2016, developers recommend olivere/elastic more on the Internet
I would highly recommend you to have a look at olivere/elastic if you haven't made decision yet. Also there is a blog post Working With Elasticsearch in Go, which demonstrates on example how to use olivere/elastic to index and search documents. (In case you want to get a flavour of how the code looks like.)
答案2
得分: 3
elastigo 在我们的生产环境中运行得非常好。至于检测“主机”,我最好的建议是阅读 elasticsearch 的文档,其中描述了它们的集群管理方案 - 大部分工作都由 elasticsearch 自身处理。在我们(相当简单的)使用中,我从未考虑过除了服务器主机地址:端口之外的任何事情 - 节点在上线时会自动连接到一个命名的集群(具有适当的配置参数),负载均衡由 elasticsearch 自身处理。
英文:
elastigo is working very well in a production setting for us. As far as detecting 'hosts' my best suggestion is to read the elasticsearch documentation which describes their cluster management scheme - most of that work is handled by elasticsearch itself. In our (rather straightforward) usage I've never had to think about anything beyond the server host address:port - nodes self-connect to a named cluster when brought online (with proper configuration parameters) and load balancing is handled within elasticsearch itself.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论