Getting Started with NCache Professional Windows
NCache Professional for Windows provides a GUI installer package (.msi) to let you easily install NCache. However, before you install NCache, the following things should be considered.
Installation Options
NCache Professional provides you with the following installation options:
Cache Server
This installs both the server and client portion of NCache software. You must install this on two or more servers for reliability. These can be dedicated servers or your web/app servers. For three or more web/app server environments, we recommend a dedicated caching tier. In this case, we recommend a 4:1 or 5:1 ratio between web/app servers and cache servers.
If you’re installing NCache on your web/app servers, then make sure you have sufficient memory and CPU power available for both, your application and NCache.
Remote Client
This installs the remote client libraries. Install this on all your web/app servers from where you want to remotely access the cache servers. Do not install it on cache servers.
Developer/QA
This installs the NCache API, online help/documentation, and a local stand-alone cache.
Note the following limitations for Developer/QA Installation Type while connecting to remote caches:
The number of remote clients that can connect to the local cache on a DEV/QA machine is up to 2. You can connect with as many local clients as you want.
The maximum number of caches that can run on the DEV/QA machine is 3, and the maximum combined size is 2GB.
The total number of requests/second per local cache is 25.
To add a client, the user can do so via the NCache Management Center and the Command Line, or the user can add the configuration manually in client.ncconf.
Throttling of 100 requests/sec for each client: All such clients that are licensed under DEV/QA license will not be able to make more than 100 requests/sec to the remote cache.
Limited number of requests a client can send to remote cache: In the lifetime of the client application, in case it is licensed under DEV/QA license, the client will stop making requests to the remote cache after it has sent 200,000 requests to the remote cache. The only workaround is to restart the application for another 200,000 requests. Once the client has made 200,000 requests, a licensing exception will be thrown, saying "Clients running under DEV/QA license cannot send more than 200,000 requests to the remote cache."
Where to Install NCache?
You can install NCache in the following environments:
- Production
- Staging
- QA
- DEV
The production environment is where your LIVE application runs. Staging is usually identical or very similar to production and contains the next version of your application and is used for the final stress testing and client/manager approvals before going LIVE.
QA environment is often separate from DEV and is used by the QA team to test your application. DEV environment is where your application is initially developed, unit tested, and integration tested. Many times, the DEV environment is also used as QA environment and there is no separate QA environment.
System Requirements
8 or More Cores: NCache is a highly multi-threaded software and takes full advantage of extra cores. The most common configuration for NCache is 8 cores or higher. You may need stronger processing power if you have higher transaction loads and/or a large amount of data being stored in NCache.
1G-bit or Faster Network Card (NICs): This improves your throughput greatly.
Disk: NCache does not make heavy use of disk space for data, so you don’t need a lot of it.
8GB or Higher RAM (16+ GB Recommended): NCache puts a minimum of 15% overhead on top of your data which can be even as high as 100% if you have extensively used indexing. Please keep this in mind while deciding how much memory to have in your cache servers. The total memory you need depends on how much data you plan to store in the cache and how much of it is indexed.
Windows Server 64-bit (2012 R2, 2016, 2019): Please try to use the latest version of Windows Server if possible.
SSD: An SSD is strongly encouraged as it'll give you much better performance compared to an HDD.
.NET 6.0
Configure Command Line Installation
NCache provides integration with Command Line to easily automate its administrative processes. Moreover, NCache remote tasks can also be managed over the network through a single machine using Command Line Tools.
Compatible Version
NCache PowerShell Provider is compatible with PowerShell version 5.1 up to 7.3.9.
Enable Script Execution
If you wish to create and execute PowerShell scripts using NCache cmdlets:
Run PowerShell as an administrator.
Set script execution policy to
RemoteSigned
to allow remote execution:
Set-ExecutionPolicy RemoteSigned
Configure WinRM Listener
To execute the remote PowerShell commands, Windows Remote Management (WinRM) needs to be configured. This is because executing remote PowerShell commands requires Windows Services Management (WS-Management) protocol which is implemented by WinRM. To learn how to install and configure WinRM, head over to Microsoft documentation.
Visual C++ 2010 x64 Redistributable
NCache installation requires Microsoft Visual C++ 2010 x64 Redistributable as a prerequisite. This may or may not be installed on your system. But, just to be sure, please go through these steps to ensure that it is installed on all cache server and remote client machines/VMs/Containers.
Run PowerShell as an administrator.
Run the following PowerShell script inside PowerShell.
# PowerShell Script: to install Microsoft Visual C++ 2010 x64 Redistributable
if ([Environment]::Is64BitOperatingSystem)
{
Write-Host "64-Bit OS Detected"
$regEntry = Test-Path Registry::HKLM\SOFTWARE\\Classes\\Installer\\Products\\1926E8D15D0BCE53481466615F760A7F
$url = "https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe"
$vcRed = "vcredist_x64.exe"
# Checking if vcredist_x64 is installed on this machine
if ($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x64 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x64
write-host "Installing Microsoft Visual C++ 2010 x64 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x64 Redistributable is already installed."
}
}
$regEntry = Test-Path Registry::HKLM\\SOFTWARE\\Classes\\Installer\\Products\\1D5E3C0FEDA1E123187686FED06E995A
$url = "https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe"
$vcRed = "vcredist_x32.exe"
# Checking if vcredist_x32 is installed on this machine
if ($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x32 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x32
write-host "Installing Microsoft Visual C++ 2010 x32 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x32 Redistributable is already installed."
}
See Also
Windows Installation
Command Line Installation
Network Installation with PowerShell
License Management