DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Microservices
  4. Using Redis on Windows

Using Redis on Windows

Microsoft sponsored a project to port Redis onto Windows, but the project was recently discontinued according to Microsoft. What are your options now?

Cihan B. user avatar by
Cihan B.
CORE ·
Apr. 18, 17 · Tutorial
Like (4)
Save
Tweet
Share
26.33K Views

Join the DZone community and get the full member experience.

Join For Free

Redis natively runs on Linux flavors (and lately on ARM). Many developers, however, want the same Redis awesomeness on Windows, as well. Microsoft sponsored a project to port Redis onto Windows, but the project was recently discontinued according to Microsoft. With this option gone, what are your options now for running Redis on Windows?

Well, you've got a few.

Run Redis on the Windows Ubuntu Subsystem

Windows 10 comes with an Ubuntu subsystem that can run Redis on your Windows host. Once you have enabled developer mode, you can run Bash on Windows 10. Launch bash and do sudo apt-get install redis-server followed by redis-server on the command prompt. You will see Redis listening on port 6379. It is important to note that the Ubuntu subsystem is a developer mode capability. This subsystem is not built for running critical applications.

Run Redis on Docker for Windows

Docker on Windows can run Linux-based containers. Simply install Docker and change your container type to Linux on Windows 10. Following the PowerShell line will switch the container type & $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon. Once you have Linux containers enabled, you can simply do docker run -d -p 6379:6379 redis and you are good to go. 

Image title

With Docker, you have more options. You can also get a distributed deployment of Redis using Redis Enterprise container on Windows. 

Redis Enterprise is simple to set up and it is compatible with existing Redis applications. Simply change your connection string and you are running your Redis app. 

Three simple steps will get you there!

1. Start the Redis Enterprise Pack Container

docker run -d --cap-add sys_resource --name redis1 -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis:latest

2. Setup Cluster With Redis Enterprise Pack

docker exec -d --privileged redis1 "//opt/redislabs/bin/rladmin" cluster create name cluster.local username redis@redislabs.com password redis123 flash_enabled

3. Create a Database on Port 12000

Note: you will need to run the curl command from "BASH on Windows" described above under "ubuntu subsystem in windows"

curl -u "redis@redislabs.com:redis123" -k --request POST --url https://localhost:9443/v1/bdbs --header 'content-type: application/json' --data '{"name":"db5","type":"redis","memory_size":1073741824,"port":12000}'

You are now ready to connect your Redis application to port 12000 to get things working on Windows.

Detailed steps for windows are here. You can also find the repo with the script to set up a multi-node cluster with Redis Enterprise Cluster.

Redis (company) Docker (software)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • When AI Strengthens Good Old Chatbots: A Brief History of Conversational AI
  • How To Create a Stub in 5 Minutes
  • Required Knowledge To Pass AWS Certified Data Analytics Specialty Exam
  • Explainer: Building High Performing Data Product Platform

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: