Oracle 一致性的客户端和缓存配置
我有一个特定的场景,我们希望使用 Coherence 作为分布式缓存。我将在这里描述这一点。
- 我有 20 多个独立进程,它们将连续地将数据放入缓存中。它们的频率各不相同,但这不是问题。
- 还有 2 个进程将从这些缓存中读取数据。
- 除了一致性提供的方式之外,我不需要任何底层数据库。数据将写入缓存并从缓存中读取。
- 我有 4 个节点集群可供我使用(无论成本限制如何),并且一致性集群将位于不同的盒子上(无论任何基础设施限制),并且缓存的填充部分和读取部分都将位于不同的机器上。
- 每日缓存的峰值内存大小将徘徊在最大 6 GB 左右,最小为 2 GB。 缓存将仅包含每日数据,并且我将有单独的归档过程来同时对其进行归档。关键是缓存大小目前只有这个大小。可以说我要把日期排除在关键方程式之外。
- 虽然我想探索是否可以将更多内容存储到这 4 个节点中。现在它的序列化很简单,可以探索其他nbinary格式。或者我应该确定这个缓存大小?
- 我的读写操作在一天中相当分散。这意味着这 2 个读取客户端和 20 多个写入客户端将继续进行读取和写入操作。并不像是其中之一更多。尽管所有后台进程中都有一个启动批处理进程,但它向缓存推送的内容比之后持续推送的内容要多。但持续推送也会推送相当多的数据。
现在我对上述几点的疑问(也因为一些困惑)
- 最大的一个是有人告诉我,根据我们购买的节点,我的连接数量有限。所以他说如果是 4 个,那么理想情况下最多应该有 4 个连接。因此,开发一个看门人类型的应用程序等等。即使我们使用 TCP Extend。从我迄今为止的阅读来看,我不这么认为。是吗?重点是如果它真的不是一个限制,就不想走那条路。
换句话说,根据集群中的节点,通过代理服务的连接是否有限制?
一些内容仅与上述相关。最多,只有当我采用扩展方式时,我才会在推送到缓存时在性能上受到一些损失,对吗?
分区缓存/近缓存。因为读取时间以及最多更新的缓存都非常关键。 (我遇到的最重要的问题)。
真的很想看看使用 POF 而不是序列化/externalizatble/protobuf 可以获得的好处。 Coherence 可以开箱即用地支持 protobuf 吗? (可能会在稍后)
I have the specific scenario for which we want to use Coherence as sitributed cache. Which I am gonna describe here.
- I have 20+ standalone processes which are going to put the data in cache continuously. the frequency of all of them differs, though thats not a concern.
- And 2 procesess which will be reading data from those cache.
- I dont need any underlying db except for the way which coherence provide. Data will be written to the cache and read from the cache.
- I have 4 node cluster at my disposal (cost constraint whatever) and the coherence cluster will be on different boxes (infra constraint whatever) and both the populating portion of the cache and the reading part will be on differnt nmachines.
- The peak memory size of the cache daily will hover around 6 GB max, min being 2 GB.
Cache will have daily data only and I will have separate archiving processes to simulatneosuly keep archiving it also. the point is that cache size for now will have this size only. Lets say I am gonna keep the date out of key equation. - Though Would like to explore if I can store more into those 4 nodes. Right now its simple serialization, can explore other nbinary formats. Or should I definietly at this size of the cache?
- My read and write operations are fairly spread out in the day. Meaning the read and write will keep on happening by those 2 reading clients and 20+ writing clients. Its not like one of them is more. Though there is a startup batch process in all of the background process which push more to the cache than the continuous pushing afterwards. But continuous pushing pushes fair amount of data too.
Now my questions regarding those above points (and because of some confusion also)
- The biggest one is somebody told me that I an have limited number of connection depending on the nodes we have bought. so he said if its 4, you ideally should have 4 connections only at the max. So, develop a gatekeeper kind of application and what not. Even if we use TCP Extend. Now from my reading so far, I dont think so. Is it? The point is dont wanna go that way if its really is not a constraint.
In other words is there limit on connection through Proxy Service dependeing on the nodes in the cluster?
Soemwhat related to above only. at the very max, I am going to get some penalty on the performance while pushing to cache only if I go the Extend way, right?
Partioned cache/near cache. As the reading time as well as the most update cache both are extremely critical. (the most imp question i have).
Really want to see the benefit which can be obtained from going to POF instead of lets say serialization/externalizatble/protobuf. Can coherence support protobuf out of the box? (may be for later on)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了正常的网络和硬件资源限制外,Coherence Extend 代理可以支持的连接数量没有技术限制。您必须询问 Oracle 销售人员是否存在许可限制。
使用代理会对性能产生一些影响,因为您要添加额外的网络跃点(客户端到代理到集群)。如果您使用 POF 序列化,则代理不必序列化/反序列化值。它可以仅以序列化形式传递对象。在大多数应用程序中,使用代理对性能的影响很小,因为 Coherence 针对网络速度进行了高度优化。除非您的客户端是 .NET 或 C++,否则您不需要使用代理,但将客户端性能与缓存的影响隔离开来是有好处的。
如果客户端有许多频繁检索的项目,则近缓存将显着提高检索性能,因为它们将在进程中找到。
POF 基于更快的序列化/反序列化和更紧凑的存储来提供性能改进。最好尝试使用基于实际生产数据的测试数据并自己测量差异。 Coherence 不支持开箱即用的 protobuf。
There's no technical limitation to the number of connections a Coherence Extend proxy can support except normal network and hardware resource constraints. You will have to ask an Oracle sales person if there are licensing limitations.
There is some performance impact from using a proxy because you are adding an additional network hop (client to proxy to cluster). If you use POF serialization then the proxy does not have to serialize/deserialize values. It can just pass the object through in its serialized form. In most applications the performance impact of using a proxy is tiny because Coherence is highly optimized for network speed. You are not required to use a proxy unless your clients are .NET or C++, but there are advantages of isolating client performance from impacting the cache.
Near cache will improve retrieval performance dramatically if there a number of frequently retrieved items for a client since they will be found in-process.
POF offers performance improvements based on faster serialization/deserialization and more compact storage. It is always best to try with test data based on your real production data and measure the difference yourself. Coherence does not support protobuf out of the box.