kascemeet.blogg.se

Install redis on ec2
Install redis on ec2









install redis on ec2
  1. Install redis on ec2 how to#
  2. Install redis on ec2 install#

Next, search for the “supervised” attribute. Next, we need to perform some configuration so modify the config file by executing the following: $ nano /etc/redis/nf

install redis on ec2

Install redis on ec2 install#

This will download and install Redis and its dependencies. Ubuntu 18.04 includes Redis as one of it’s packages, so you don’t have to connect to any other repositories to install. Once these commands have been executed, your Ubuntu server will be up to date with the latest version of its packages. I use the sudo -s command so that I don’t have to type sudo every line. The first thing I like to do on a new server instance is make sure everything is up to date. pem file with an access key (if you don’t already have one) in order to connect to the server.

Install redis on ec2 how to#

If you’re on a Windows computer and want to use PowerShell as your SSH client, check out this great article on How to Enable SSH in PowerShell. I use a Mac, so the Terminal found in Applications > Utilities > Terminal works perfectly for me. The next step was to connect to the server using SSH.

  • I launched the instance, created an Elastic IP address and bound it to the instance.
  • This is the default port Redis uses for connections.
  • I created a new security group on the “Configure Security Group” page called Redis and opened port 6379 to the server.
  • I bumped the hard drive size from 8 GB to 20 GB on the “Add Storage” page.
  • I selected “protect against accidental termination” on the “Configure Instance Details” page.
  • On the next few pages I changed a limited number of options. Note… they try to distract you with a big blue “Review and Launch” button, but I wanted to configure some more options before committing. 2 processors, 2 GB of RAM for (as of the time of this writing) $206 for a three year term.Īt the bottom of this page, I clicked “Next: Configure Instance Details”. Based on these things, and after a review of the AWS Reserved Instance pricing page, I selected a t3.small instance. They also stated that they had no problem signing on for a server for a long term commitment. They weren’t going to have a million sessions… but they might have more than a thousand. The clients I was working for had an application that had moderate use.
  • 1 Million Keys -> Hash value, representing an object with 5 fields, use ~ 160 MB of memory.
  • 1 Million small Keys -> String Value pairs use ~ 85MB of memory.
  • An empty instance uses ~ 3MB of memory.
  • I know that Redis isn’t ridiculous when it comes to memory usage, but I wanted some more information. I needed to know how much power and memory the server needed. Next, I was given a list of instance types with different configurations. Next, I was given a list of AMI’s to choose from. Since my client’s existing servers are in the AWS Oregon datacenter, I left that as the choice. Choose one that seems reasonable for you. At the top of the page, there’s a drop down list with a choice of data centre locations. It’s worth it to note that Amazon has many datacenter around the world.

    install redis on ec2

    Next, I clicked on “Launch Instance” under the Create Instance header. EC2 is the name of Amazon’s virtual servers in the cloud service. Once I was logged in, I searched for “EC2” under AWS Services. If not, head over to Amazon Web Services and set up an account. If you have an existing AWS account this is pretty straight forward. The first step is to spin up an Amazon EC2 instance running Ubuntu 18.04. Let’s get started! Step 1 – Spin Up the Server Pretty, right? Two ColdFusion Servers, both of which connect to a back end database, and use an Ubuntu 18.04 server running Redis as their external session storage. As long as the two servers can connect, this will work. If your company hosts servers in house, you can still pull this off seamlessly. The fact that their existing servers are on AWS has no bearing on the rest of this tutorial. Also, let me be clear that being cloud based isn’t necessary either. They use some other AWS Services (Elastic IP Addresses, AWS SES for emails and messaging, and S3 for storage of some large files,) but for the most part this is it. Now… to some degree, I’m oversimplifying here. Keep in mind, this client has a super simple set up for their ColdFusion application. Luckily, ColdFusion 2018 natively supports external session storage through Redis. As part of this scaling project, they wanted to offload their session management to an external session storage. It was relatively minor… they had a single ColdFusion server and wanted to move to two. I recently had an opportunity to work with a client who was scaling their resources.











    Install redis on ec2