【kafka系列教程44】Java版本

Java版本

 

From a security perspective, we recommend you use the latest released version of JDK 1.8 as older freely available versions have disclosed security vulnerabilities. LinkedIn is currently running JDK 1.8 u5 (looking to upgrade to a newer version) with the G1 collector. If you decide to use the G1 collector (the current default) and you are still on JDK 1.7, make sure you are on u51 or newer. LinkedIn tried out u21 in testing, but they had a number of problems with the GC implementation in that version. LinkedIn's tuning looks like this:

从安全的角度,我们推荐你使用最新的发布版本JDK1.8,旧版本已经公开披露了一些安全漏洞,LinkedIn现在正在运行的是JDK 1.8 u5(希望升级到新版本)使用G1收集器,如果你想在在JDK 1.7使用G1收集器(当前默认),请确保在u51或更高的版本,LinkedIn尝试在u21测试,但该版本存在大量G1执行的问题。LinkedIn的配置如下:

 

-Xmx6g -Xms6g -XX:MetaspaceSize=96m -XX:+UseG1GC
  -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=16M
  -XX:MinMetaspaceFreeRatio=50 -XX:MaxMetaspaceFreeRatio=80

 

For reference, here are the stats on one of LinkedIn's busiest clusters (at peak): 

供参考,下面是关于 LinkedIn 的繁忙集群 (高峰) 之一的统计:

- 60 brokers

- 60个brokers

- 50k partitions (replication factor 2) 

- 50k 分区 (副本 2) 

- 800k messages/sec in 

 -800k 消息/秒

- 300 MB/sec inbound, 1 GB/sec+ outbound 

 300 MB/sec的入站, 1 GB/秒+ 出站

The tuning looks fairly aggressive, but all of the brokers in that cluster have a 90% GC pause time of about 21ms, and they're doing less than 1 young GC per second.

这个调整看来相当激进, 但是集群中的有90%的GC暂停时间大约是21ms, 以及每秒小于1 个的年轻代GC.

 

安全概述

在发布的0.9.0.0中,kafka增加了许多功能,可以一起使用也可以分开使用,kafka集群提高了安全性,目前支持以下的安全措施。

  1. broker使用SSLSASL(Kerberos),验证客户端(生产者或消费者)、其他broker或工具的连接。支持以下的SASL机制:
    • SASL/GSSAPI (Kerberos) - 从0.9.0.0版本开始
    • SASL/PLAIN - 从0.10.0.0版本开始
    • SASL/SCRAM-SHA-256 和 SASL/SCRAM-SHA-512 - 从0.10.2.0版本开始
    • SASL/OAUTHBEARER - 从2.0版本开始
  2. 从broker连接到Zookeeper的身份验证。
  3. broker和client之间的数据传输,broker之间,或使用SSL的broker和工具之间的数据加密(注意,当SSL时,性能会降低,其幅度取决于CPU类型和JVM)。
  4. client的read/write操作验证。
  5. 验证是插拔的,支持外部认证服务集成。

值得注意的是,安全是可选的 - 支持非安全集群,以及经过身份验证,未认证,加密和未加密客户端的组合。下面的指南介绍如何配置和使用client和broker的安全特性。



 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值