题目详情

阅读以下关于数据管理的方案设计,在答题纸上回答问题1至问题3。

【说明】

互联网公司因业务发展要建立网上平台为用户提供一个对网络文化产品进行评论 (小说,电影等)交流的平台,该平台的部分功能如下

(a)用户帖子的评论计数器

(b)支持粉丝列表功能

(c)支持标签管理

(d )支持共同好友功能

(e)提供排名功能

(f)用户的信息结构化存储

(g)提供好友信息的发布/订阅功能。

该系统在性能上需要考虑高性能,并发,以支持大量的用户同时访问,经过考虑,在数据管理上,决定采用Redis+数据库的解决方案。

【问题1】

Recdis支持丰富的类型,请选择题干描述的(a)-(g)功能选项。填入表4-1中(1)-(5)空白处。

高级系统架构设计师,历年真题,《系统架构设计师》案例分析真题汇编

【问题2】

缓存中存储当前的热点数据Redis为每个key值都设置了过期时间,以提高缓存命中率,为了消除非热点数据Redis选择了定期删除加惰性删除策略。如果该策略失效Redis内存使用率会越来越高,一般采用内存淘汰机制来解决。 请用100字以内的文字,简要描述该策略的失效场景,并给出三种内存淘汰机制。

正确答案及解析

正确答案
解析

问题1

(1)a (2)b (3) c d (4)f (5)e

问题2

由于redis定期删除是周期性轮询redis库中的时效性数据,采用随机抽取的策略,利用过期数据占比的方式控制删除频度,不可能扫描清除掉所有过期的key并删除,而惰性策略就是在客户端访问这个key的时候,对过期时间进行检查,如果过期了就立即删除。如果一些key定期删除没有抽取到,惰性删除也未触发,这样redis的内存占用会越来越高,此时就需要内存淘汰机制。

常用的内存淘汰机制:

(1)volatile-lru:从已设置过期时间的数据集中挑选最近最少使用的数据淘汰。

(2)volatile-ttl:从已设置过期时间的数据集中挑选将要过期的数据淘汰。

(3)volatile-random:从已设置过期时间的数据集中任意选择数据淘汰。

(4)volatile-lfu:从已设置过期时间的数据集挑选使用频率最低的数据淘汰。

(5)allkeys-lru:从数据集中挑选最近最少使用的数据淘汰

(6)allkeys-lfu:从数据集中挑选使用频率最低的数据淘汰。

(7)allkeys-random:从数据集(server.db[i].dict)中任意选择数据淘汰

(8)no-enviction(驱逐):禁止驱逐数据,这也是默认策略。

(任选其中三种)

包含此试题的试卷

你可能感兴趣的试题

单选题

Advancements in ( )have contributed to the growth of the automotive industry through the creation and evolution of self-driving vehicles.

  • A.Artificial Intelligence
  • B.Cloud Computing
  • C.Internet of Things
  • D.Big Data
查看答案
单选题

In project human resource management , ( )is not a source of power for the project manager.

  • A.referent power
  • B.expert power
  • C.reward power
  • D.audit power
查看答案
单选题

At the project establishment stage , the feasibility study mainly includes techinical feasibility analysis , ( ), operation environment feasibility analysis and other aspects of feasibility analysis.

  • A.detail feasibility analysis
  • B.opportunity analysis
  • C.economic feasibility analysis
  • D.risk analysis
查看答案
单选题

( )is a grid that shows the project resources assigned to each work package.

  • A.Stakeholder engagement assessment matrix
  • B.Requirements traceability matrix
  • C.Probability and impact matrix
  • D.Responsibility assignment matrix
查看答案
单选题

Xinhua News Agency reported in January 2022,Chian will further promote the developmet of a digital economy during the 14th Five-Year Plan eriod(2021-2025). The plan also emphasized industrial ( )transformation.

  • A.digital
  • B.networking
  • C.intelligentize
  • D.informatization
查看答案

相关题库更多 +