NCache .NET용으로 개발된 매우 빠르고 확장성이 뛰어난 인메모리 분산 캐시로, 컨테이너 환경을 기본적으로 지원합니다. 이를 통해 데이터베이스 확장 병목 현상을 해결하고 고동시성 컨테이너 환경에서 애플리케이션을 선형적으로 확장할 수 있습니다. Windows 설치 프로그램을 다운로드할 수 있습니다. (.msi) Windows에 설치합니다. 또는 다음을 배포하여 설치를 간소화할 수 있습니다. NCache 도커 컨테이너에서.
업계 표준 사용 시작 방법 NCache 미리 만들어진 것을 가져오는 것입니다 NCache 도커 이미지 Docker Hub에서. 이러한 Docker 이미지는 다음과 같이 사전 설치되어 제공됩니다. NCache.NET 환경에서 기존 인메모리 솔루션보다 뛰어난 성능을 제공하는 즉시 사용 가능한 분산 캐시를 제공합니다. "docker pull" 명령만으로 환경에 설치할 수 있습니다. 이를 통해 엔터프라이즈급 CI/CD 파이프라인과 원활하게 통합할 수 있습니다.
NCache Ubuntu 기반 Linux에서는 Docker 이미지로 제공됩니다. 다른 Linux 버전은 다음을 사용하세요. 도커 파일 에 의해 제공 Alachisoft 원하는 버전이나 Linux에 맞게 수정하세요. 실행 중 NCache Docker 환경에서는 .NET 애플리케이션에 대해 특유의 1밀리초 미만의 지연 시간과 선형적인 확장성을 유지합니다.
대부분의 상황에서 사전 구축된 NCache Docker Hub의 이미지만 있으면 빠르게 배포할 수 있습니다. 하지만 경우에 따라 사용자 정의 Docker 이미지 여기에는 사용자 자신의 소프트웨어나 표준 OS 소프트웨어의 다른 변형도 포함됩니다.
이것의 한 예는 Linux의 특징입니다. NCache Docker Hub의 Docker 이미지는 Debian Linux를 사용하지만 다른 Linux 버전을 원할 수 있습니다. NCache 서버; NCache 여러 Linux 버전에서 잘 작동합니다. 또는 애플리케이션 서버(NCache 귀하의 애플리케이션뿐만 아니라 다음도 포함하는 클라이언트) NCache 클라이언트 소프트웨어에 적합합니다. 이 접근 방식은 컨테이너 시작 시간을 최적화하고 개발 및 프로덕션 환경 전반의 일관성을 보장합니다.
그러한 모든 경우에, Alachisoft 사용자의 필요에 맞게 편집하고 사용자 정의할 수 있는 다양한 Dockerfile을 제공합니다.
사용자 정의 Docker 이미지를 생성하기 위해 편집할 수 있는 이러한 Dockerfile의 예는 다음과 같습니다.
일반적인 Dockerfile 예시 NCache NCache 서버 트래픽이 많은 마이크로서비스, ASP.NET Core 세션 공급자 및 실시간 Pub/Sub 메시징에 이상적입니다. 다음과 같은 형태입니다.
# Setting base image for NCache.
FROM ubuntu:22.04
# Setting work directory to copy setups and resources for configuring NCache.
WORKDIR /app
# Make sure your machine has access to internet for installation of packages
# Make sure that the folder ("resources") exist in the same directory as the Dockerfile.
# Make sure that "ipbinding.sh" script resides in the "resources" folder.
# Make sure that "installncache.sh" script resides in the "resources" folder.
# Make sure that NCache Linux setup (.tar.gz) resides in the "resources" folder. It can be downloaded from https://www.alachisoft.com/download-ncache.html.
# Copying resources and setups into the work directory of the container.
COPY resources .
# Exposing ports used by NCache for communication.
EXPOSE 8250-8260 9800 7800-7900 8300-8400 9900 10000-10100
# Installing prerequisite ...
RUN apt-get update && apt-get install -y \
procps \
ed \
apt-transport-https \
curl \
libicu-dev \
&& rm -rf /var/lib/apt/lists/*
# Installing NCache Linux setup (.tar.gz).
# The parameter "--firstname" represents the first name of the user.
# The parameter "--lastname" represents the last name of the user.
# The parameter "--company" Provide your company name.
# The parameter "--email" Provide your email address.
# The parameter "--installkey" Installation key provided by alachisoft.com.
RUN chmod -R 775 /app \
&& ./installncache.sh --firstname "YOUR_FIRST_NAME" --lastname "YOUR_LAST_NAME" --company "YOUR_COMPANY" --email "YOUR_EMAIL" --installkey "******" --installmode "server" \
&& rm -rf /var/lib/apt/lists/*
# Switching the current user to ncache user
USER ncache
# Entry point for the container, once all the required configurations have been made.
ENTRYPOINT ["/app/startup.sh"]