同花顺面试(部分)

又没录上,只能凭零星记忆来记录了

  • 知识图谱有了解吗,知道用在你们系统哪个环节吗
  • tomcat内存设置的多大。32位系统的话有限制吗?复盘:后面一想,可能是说32位系统地址寻址空间有限,内存最多4G
  • gprc你们用的序列化方式?A:protobuf。Q:网络通信协议是HTTP还是TCP。复盘:HTTP2
  • 如何处理kafka的重复消息
  • elasticSearch集群搭建的情况。index是定时刷新还是实时刷新的?
    我参考了一些文档1 2 ,包括elastic的官网3

Sitting between Elasticsearch and the disk is the filesystem cache. Documents in the in-memory indexing buffer (Figure 1) are written to a new segment (Figure 2). The new segment is written to the filesystem cache first (which is cheap) and only later is it flushed to disk(which is expensive). However, after a file is in the cache, it can be opened and read just like any other file.

在这里插入图片描述

In Elasticsearch, this process of writing and opening a new segment is called a refresh … You can control refreshes through the following means: … Waiting for the refresh interval …

By default, Elasticsearch periodically refreshes indices every second … This is why we say that Elasticsearch has near real-time search

给出了自己的简单概括(这个也可以回答2021年面试乐言时为什么es是近实时的提问):
ES写入数据是先把数据写进内存,再写入 filesystem cache,最后再写入硬盘。在第二步(写入filesystem cache形成新的segment,这一步也被称为refresh)后,新数据就可以被搜索到了。refresh默认一秒执行一次(其实官网原文还有个条件,就是过去30秒有收到查询请求的index)。


  1. ES近实时刷新与refresh_interval参数设置相关问题 ↩︎

  2. elasticsearch的数据写入流程及优化 ↩︎

  3. elastic : Near real-time search ↩︎

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qq_23204557

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值