通过C#中使用ElastiCacheElastiCache

2023-09-11 09:28:44 作者:叶落若相随

我试图安装弹性缓存(memcached的发动机)及通过memcache的C#的客户端APIEnyim在我的.NET应用程序中使用。

I was trying to setup Elastic cache (memcached engine) & use in my .NET application through a memcache c# client API "Enyim".

我是新来的AWS和面临的一些问题。我有几个问题: -

I'm new to AWS and facing some problems. I have few questions :-

问题1:我可以从我的本地机器访问我的缓存集群节点?

Question 1 : Can I access my cache cluster nodes from my local machine ?

第二个问题:什么是建立完整的AWS弹性缓存实例的过程。正确 我,如果我错了: -

Question 2 : What is the process of setting up complete AWS Elastic cache instance. Correct me if i'm wrong :-

设置VPC(默认) 安装在EC2安全组(默认) 设置缓存集群与同一VPC。 现在,我怎么能使用同样的缓存集群?

Setup VPC (by default) Setup a security group in EC2 (by default) Setup cache cluster as with same VPC. Now how can i use this same cache cluster ?

我已经安装在本地及放大器的memcache的发动机;通过Enyim同一code的运行,但我没能为Elasticache节点实例上运行相同(获取/设置)code。

I have setup the memcache engine on local & the same code through Enyim was running but i was not able to run same (get/set) code for the Elasticache node instances.

推荐答案

至于问题1,我一定用弹性缓存Redis的味道,当你不能(根据AWS永远可以)来访问缓存从除了在AWS的任何地方。

As far as Question #1, I am certain when using the redis flavor of elastic cache you cannot (according to aws never will be able) to access the cache from anywhere except within AWS.

有关调试的目的,这将是很好能够,但在生产模式下,访问来自AWS之外的缓存会带来足够的等待时间打败你可能会使用缓存摆在首位任何好处。

For debugging purposes it would be nice to be able to, but in production mode, accessing the cache from outside aws would introduce sufficient latency to defeat any benefit you might get from using the cache in the first place.