Windows 및 .NET에서 Memcached
이미 Windows 환경에서 프로덕션 용으로 memcached를 구현 한 사람이 있습니까? 내가 읽은 많은 블로그 때문에 특히 프로덕션 용도로 Windows에서 memcached를 실행하지 않는 것이 좋습니다 (예 : windows에서 memcached 실행) .
그리고 한 가지 더, c # 및 .net 3.5와 함께 사용하기에 좋은 memcached 클라이언트는 무엇입니까? Memcached Providers @ Codeplex , Beitmemcached 및 memcached provider @ Sourceforge 와 같은 많은 대안을 찾았습니다.
Windows에서 memcached를 실행해야하는 이유는 무엇입니까? 프로덕션 환경에서는 비용이 많이 듭니다.
코드가 Windows 환경에서 실행되어야하는 경우 Windows memcached 클라이언트를 가져와 * nix 기반 memcached 시스템과 통신하십시오.
Server 2003 또는 2008에서 memcached를 실행하는 프로덕션 환경에서는 이러한 모든 제품에 대한 라이선스를 얻게됩니다. Linux는 모든 OSS 이점을 제공합니다. TCO는 Windows에서 memcached로 선형 적으로 증가합니다.
편집하다:
이 답변을 작성한 지 약 1.5 년이되었고 그 이후로 많은 것이 바뀌 었습니다. 특히 Dustin과 같은 사람이 댓글을다는 경우주의해야합니다.
따라서 실행중인 Windows에서 memcached를 얻는 방법은 다음과 같습니다. Couchbase (이전 Northscale)에서 Windows 용 memcached를 다운로드 합니다.
일반적으로 동일한 프로덕션 머신에서 memcached를 실행하려는 경우 제한된 메모리에서 시작하려고합니다. 즉, memcached가 사용할 수있는 최대 메모리를 정의합니다.
c : \ Program Files \ memcached> memcached.exe -m 128.
여기서 memcached는 최대 128MB 사용량으로 실행됩니다. memcached가 웹 서버의 모든 메모리를 차지하는 것을 원하지 않습니다.
memcached 를 확장 하기로 결정한 순간 앞서 말한 내용을 고려해야합니다. 또한 키 값 조합에서 값을 압축하십시오. 웹 서버는 일반적으로 CPU 사용량 (2 ~ 3 %)을 거의 사용하지 않으며 압축은 CPU 사용량과 비교하여 네트워크 전체에 많은 가치를 제공합니다. 일반 압축이 너무 걱정된다면 LZO를 사용해보십시오.
여기에 아무도 Redis 를 언급하지 않았다는 것이 놀랍습니다. Redis 는 문자열에 대한 풍부한 데이터 구조 지원을 제공하는 가장 기능이 풍부하고 가장 빠른 (초보 수준의 Linux 상자에서 초당 110,000 SET) 키-값 데이터 저장소 중 하나입니다. 세트, 목록, 정렬 된 세트 및 해시.
Windows가 공식적으로 지원되는 플랫폼은 아니지만 모든 테스트를 통과 한 창에서 완벽하게 실행됩니다. https://github.com/ServiceStack/ServiceStack.Redis#redis-server-builds-for-windows에서 사용할 수있는 Windows 빌드 (Cygwin 사용)가 있습니다.
또한 오늘날 사용되는 거의 모든 프로그래밍 언어에 대한 클라이언트 바인딩이 있습니다. https://github.com/ServiceStack/ServiceStack 에서 모든 IOC에 놓을 준비가 된 모든 C # POCO 유형, 트랜잭션 지원 및 스레드로부터 안전한 클라이언트 관리자에 대한 기본 API 지원이 포함 된 풍부한 오픈 소스 C # Redis 클라이언트를 유지합니다 . Redis
당시에는 Velocity가 존재하지 않았기 때문에 저는 제가 근무하는 Skiviez 회사를 위해 Windows에 memcached 포트를 사용했습니다. 주로 동일한 시스템의 여러 작업자 프로세스에 중앙 집중식 캐시를 제공하기 위해서만 존재합니다. 현재 약 18 개월 동안 사용률이 낮은 전자 상거래 사이트 (~ 18,500 조회수 / 일)에서 잘 작동하고 있습니다. 내가 사용한 클라이언트는 iBATIS.NET 의 캐시 공급자로 통합 된 Enyim이었습니다. 그 클라이언트는 충분히 잘 작동하는 것 같습니다. memcached 클라이언트는 시작하기에 그리 복잡하지 않습니다.
다시해야한다면 분산 캐싱 솔루션을 위해 Windows를 계속 사용하기로 약속했다면 Velocity를 살펴볼 것입니다. 하지만 지금은 작동하므로 건드리지 않겠습니다.
(제외 : 그 이후로 Cache*
매일 저녁 예약 된 작업에 의해 업데이트되는 데이터베이스의 주요 테이블에 특정 열을 추가하여 캐시에 대한 대부분의 요구를 무효화했습니다 . 이로 인해 초기부터 모든 리소스에 대한 부담이 훨씬 줄어 들었습니다. 캐시 된 결과를 memcached에 보관하여 메모리 가용성에 대한 후속 부담을 데이터베이스에 쿼리하여 CPU 시간을 기록했습니다. 또한 캐시 된 버전의 데이터가 액세스 될 때 코드에서 훨씬 더 명시 적으로 처리되었습니다. 즉석 버전입니다. 분산 캐시를 사용해야하는 이유가 많을 것 같지만, 한 발 뒤로 물러서서 정말 필요한지 여부에 대해 질문 할 가치가 있습니다!)
작업중인 프로젝트가 무엇인지 모르겠지만 페이지에서 Microsoft Velocity 프로젝트를 살펴보고 싶을 수도 있습니다 .
"Velocity"는 확장 가능한 고성능 애플리케이션을 개발하기위한 분산 인 메모리 애플리케이션 캐시 플랫폼입니다. "Velocity"는 모든 CLR (공용 언어 런타임) 개체를 캐시하는 데 사용할 수 있으며 간단한 API를 통해 액세스를 제공합니다. "Velocity"의 주요 측면은 분산 캐시 성능, 확장 성 및 가용성입니다.
몇 가지 데모를 보았는데 .net 프레임 워크와 정말 잘 통합 된 것 같습니다.
클라이언트 API의 문제는 LAMP 스택을 사용하여 언급 한대로 선호하는 다른 상자에서 실행중인 memcached 인스턴스가 여전히 있어야한다는 것입니다. 속도를 사용하면 동일한 스택에서 계속 실행되고 .net 플랫폼 전반에 걸쳐 더 긴밀하게 통합됩니다.
즉, 속도를 다른 .net 응용 프로그램의 캐시로 사용하려면 자체 API를 작성하여 사용을 위해 속도 데이터를 노출해야 할 수도 있습니다.
Velocity는 관리에 조금 더 관여하지만 memcached보다 훨씬 강력합니다. 나는 anti-memcached가 아니며, 조금도 좋지 않습니다. 그러나 앞으로는 순수한 .NET 기반의 새로운 프로젝트는 현재 미발매 상태에서도 Velocity를 활용하지 않는 것이 미친 짓입니다.
have a look at SharedCache. its open source, easy to use and very reliable.
high-performance, distributed memory object caching system, generic in nature, but intended to speeding up dynamic web and / or win applications by alleviating database load. Don't forget to visit us at http://www.sharedcache.com
The problem with the client API's is that you still have to have an instance of memcached running on another box somewhere preferrably as you've noted, using the LAMP stack.
Not at all true. The LAMP (Linux, Apache, MySQL, PHP) stack is not required to run Memcached. I currently prefer memcached over velocity until velocity is out of CTP. I've played around with velocity for a bit but found it too unwieldy. I follow that whole KISS thing, you know... keep it simple. Nothing simpler than caching... Get(key)... Put(key, value)... Destroy(Key).
As an addendum to mentions of Velocity above, this was released by Microsoft as part of AppFabric. More details here.
Check out the various questions involving AppFabric and Cache here on StackOverflow.
I know I'm a little late to the party here, and there are already tons of good answers.
We've used Membase on Windows Server with great success. It is 100% compatible with Memcached, and has a nice GUI installer and web configuration server build it. It is extremely easy to administer.
There are also other NoSQL features included, which are outside the scope of this thread, but worth looking at. They do have a free license for development, testing, and (limited) production servers.
That same page has a Windows Install for Memcached only, if you don't want any of the extra features in Membase.
Please follow the links mentioned below to see the solution for this question.
I could implement the memcached for production use in windows environment.
http://www.codeproject.com/Articles/96698/Implementing-Distributed-Caching-using-Memcached http://www.deanhume.com/Home/BlogPost/object-caching----net-4/37 http://latebound.blogspot.com/2008/10/using-memcached-from-c.html
If you're interested in running a memcached client on Windows then there are two additional open source servers that can do the job. Both implement the standard memcached server protocol and are written in Java so they run on Windows.
참고URL : https://stackoverflow.com/questions/351635/memcached-with-windows-and-net
'developer tip' 카테고리의 다른 글
다른 모듈에서 모듈 변수를 변경하는 방법은 무엇입니까? (0) | 2020.09.22 |
---|---|
Node JS 오류 : ENOENT (0) | 2020.09.22 |
파이썬 3에서 바이트에 대해 b '접두사없이 억제 / 인쇄 (0) | 2020.09.22 |
The specified DSN contains an architecture mismatch between the Driver and Application. JAVA (0) | 2020.09.21 |
Proper way to implement a never ending task. (Timers vs Task) (0) | 2020.09.21 |