Heroku Scalability Simplified

What is Scalability?

Scalability is a general software concept. It means that a system is built in a way that can be easily grown in regards to usage (example: more people accessing a site) or adding new features to the site. It is the ability the software has to continue to properly function as its context changes.

In Heroku, it refers to the system being able to cope with more users or more traffic.

Heroku Scalability

Heroku provides easy-to-use tools that enable developers to scale dynos (Heroku app containers) instantly to meet demand. After an app is deployed, it may require adjustments in response to things like increased traffic, new functionalities, or business scale. You can scale using the Heroku Dashboard or Heroku CLI.

Heroku Dashboard:

The Heroku dashboard is the web user interface for Heroku’s core features and functionality. It enables programmers to manage their apps, add-ons, deployment processes, metrics, and much more. It provides a simple slider interface for scaling dynos and you see the results immediately reflected in your dyno formation.

Heroku CLI:

Developers can also oversee their dyno formation using the Heroku command-line interface (CLI). This allows you to create and manage apps from the shell of various operating systems. Through a simple command, you can enlarge the number of web and worker dynos, or change the dyno type of any number of dynos at once.

Scalability Resources

Scalability resources fall into two broad categories: horizontal and vertical. Additionally, Heroku offers a third type called autoscaling. 

Scaling horizontally: adding more dynos

Adding more dynos of a given dyno process type scales your application horizontally. For example, adding more web dynos lets Heroku route incoming HTTP requests across more running instances of your web servers, which will typically improve performance for a higher traffic volume. 

Also, adding more worker dynos allows your app to process more jobs in parallel and handle a larger volume of jobs. There are some cases where scaling horizontally won’t help, such as bottlenecks on the backend services and long requests or jobs.

Scaling vertically: upgrading to larger dynos

Upgrading dynos to larger dyno types will provide your app with more memory and CPU resources. 

All the dynos are isolated. But, apps running on Free, Hobby, and Standard dynos may share an essential compute instance —they are multi-tenant—and consequently may encounter some degree of performance variance. Performance dynos and those that run in Heroku Private Spaces do not share an underlying compute instance with other dynos, so they experience low variability in performance.

Autoscaling

Heroku enables you to automatically increase the number of web dynos needed to meet the specified 95% response time threshold. Based on your app’s existing throughput, the autoscaling feature removes the need to anticipate traffic spikes. Autoscaling is included for free on Performance and Private dynos.

Heroku makes it super easy for developers to scale any number of device integrations individually. Developers can simply provision more dynos to handle increased traffic coming in from a specific device.

If Autoscaling doesn’t cover your needs or is not working as expected for your apps, Heroku recommends trying the Rails Auto Scale add-on or Adept Scale add-on.

Scalability Simplified, with Examples

Horizontal Scalability

If you have a store that serves clients and you expect 10 clients at the time, you will hire 2 employees to provide customer service. Suddenly, your store becomes popular and 100 clients arrive at the same time. Those 2 employees won’t be enough to meet their needs. You will need to scale horizontally, employing more people to serve more clients. 

The store works like your app, website, mobile application, system, etc. The site was prepared for 10 users connected at the time working with 2 web dynos. Suddenly, your site has 100 users loading the site at the same time. To scale horizontally in Heroku, you can add more web dynos. The incoming HTTP requests can be linked to more clients arriving at the store, waiting to be served. 

If your store is a restaurant, the people serving the clients would be the waitress. However, restaurants not only can satisfy customer needs only with waitresses; there are also employees working behind the counter in the kitchen. Even if you hire 100 waitresses, if you have only one person cooking, that person won’t be able to cook for 100 people. You will need more people working in the kitchen. 

Kitchen employees are the worker dynos in Heroku, they are in charge of doing background jobs. If you have more, they can cook in parallel. The same happens with worker dynos

Vertical Scalability

Horizontal scalability might not always be enough. Continuing with the restaurant example, if the restaurant premises are too small, even if you hire 100 waitresses and 10 people in the kitchen, you won’t be able to fit enough tables. You will need to increase your capacity. You will need to scale vertically

Another example that can be related to Heroku would be if your chef only knows how to prepare juices or if your waitress only speaks one language. Those cooks won’t be able to add more things to your menu and that waitress won’t allow you to serve clients that speak other languages. In this case, the issue won’t be solved by adding more waitresses or cooks, you will need to employ people that have the skills that you need. In this case, you will need to scale vertically.

Autoscaling

So, what would happen if the demand in your restaurant is variable? 

It wouldn’t be cost-effective to pay 100 waitresses full-time. However, you will need employees who can be hired with short notice when more people arrive at the restaurant. You will need full-time employees and people you call in emergencies. This is what Heroku offers with its autoscaling system. Developers can set up 10 dynos, and add additional dynos when the response time is slow. When the workload increases, Heroku automatically provides the extra dynos needed to cope with the demand. Once the demand decreases, it automatically disables it, allowing you to save money. 

Heroku offers a practical step-by-step guide showing you how to scale your dyno formation easily. If you want to learn more about Heroku, click here, you will find useful information and three ways it enhances cloud infrastructure. 

Heroku: Simplify and improve your cloud infrastructure

Data plays an enormous role in the success of any organization. Collecting and quantifying pertinent information builds a stronger roadmap for growth. Because of this, companies are collecting and storing data to forecast future trends and develop action plans. That’s a lot of data to manage and most companies don’t have the right technology in place. This is where the cloud sweeps in to save the day. Cloud platforms enable companies to store large volumes of data to repurpose for business transactions. As a result, cloud infrastructure demand is growing for businesses of all sizes, as they have come to realize the massive benefits and potential of utilizing cloud components. Heroku is a first-class platform that helps developers scale more effectively.

What is Heroku?

 

Heroku is a platform as a service (PaaS) cloud that supports several programming languages and is part of the Salesforce Platform. Because it supports the most relevant programming languages used in the industry, it has become a popular tool for enhancing cloud infrastructure. Developers, teams, and businesses of all sizes use Heroku to deploy, manage, and scale apps. Using bi-directional synchronization, Heroku unifies the data in your Heroku data with your Salesforce CRM data. Additionally, Salesforce Trailhead was built and launched on Heroku. 

3 ways Heroku enhances cloud infrastructure:

 

  • Several Programming Languages: Initially, Heroku only supported Ruby on Rails. However, over the years it expanded to include other languages such as, Java, Node.js, Scala, Clojure, Python, PHP, and Go. The benefit here is the ability it provides users to create applications that are robust and versatile.

 

  • Rapid Delivery:  Developers are able to deploy their code to Heroku with a one-line command in the terminal. Having all the power of Amazon Web Services (AWS) in the background, but without having to take care of setting up its infrastructure. Heroku has it all covered for you!. Access to all of these resources and capabilities massively cuts down project time and allows developers to focus on creativity and higher-level work.

 

  • Scalable Functionality: Heroku allows developers to construct while not having to sacrifice impressive UI and effective application functionality. Heroku is able to accommodate spikes and dips in traffic without having to purchase more hardware. The system is able to cope with higher loads of users or more traffic reaching the system. 

 

As you can see, Heroku has many features that simplify and improve cloud infrastructure at a very granular level. By utilizing the Heroku platform, developers are able to build applications that are efficient, visually pleasing, and all at a fraction of the time and cost it would take to develop on other platforms. 

Oktana’s Experience 

 

Here at Oktana, we are avid users of the platform and always seek out the best technologies to leverage for our customers. We’ve used Heroku to develop a number of outstanding applications across several different industries. Among them, you can find a Leading Investment Firm, a Fintech Company, and MedZed

We’ve seen firsthand the kind of power Heroku brings to drastically improve application development. That’s why we’re extremely proud to announce that we’ve recently received a Specialization Badge for outstanding Heroku development from Salesforce! We’re super excited to be recognized for our expertise and it motivates us to develop even more applications with the platform. We think it’s a great tool and highly recommend it to developers who really want to extend cloud infrastructure to the next level.

 

 

 

How we connected Salesforce and Slack

The Oktana team built a demo to share how Salesforce and Slack work together. Our team leader walks through how the team built a Node.js app on Heroku that connects to the Slack API and Sales Cloud. The app is capable of both reading and writing to Salesforce from Slack.

You can create and update Salesforce tasks without ever leaving Slack. If someone else updates or assigns a task to you in Salesforce you’ll get a notification alongside all your other Slack messages. Take a look and let us know if something like this might be a good fit for your company.

Hope you’ve found this full walkthrough useful and insightful. We are Salesforce platform experts and offer custom development to help you build your platform and solve the right problems. Our team has worked with different organizations and their projects. If you want to know more about our work, go check out our latest success stories.

App Development with Salesforce Technologies

Working together with our partners to bring ideas to life is one of the driving forces behind everything we do here at Oktana. That’s why when Huge approached us to help them with app development for Stanley Security; we leaped at the chance.

Stanley is a large security company specializing in commercial security systems. They needed a tool for their field sales team to use on the go that showcased their current product offerings. Also, they preferred to manage the process through the app, on either computers or tablets.

Huge has excellent skills in front-end development and was planning to develop the app and the UI/UX elements internally. But they needed a partner to help complete the backend work and sync everything up with Stanley’s Salesforce instance. That’s where the team at Oktana came in. Huge was able to focus on designing a front-end experience that would satisfy Stanley’s sales team. Meanwhile, Oktana could focus on a seamless experience on the back end.

How do the front and the back of this application work, and what did it take to make them play nicely? The front-end app was built utilizing React and Node.JS, managed with a Postgres database that Huge hosted on Heroku. For our backend development, we needed to make sure everything tied into the Postgres database correctly. To do that we utilized Heroku Connect to transfer between the front-end database and Salesforce. Additionally, we mapped all the data so that everything was stored where it needed to be on both ends of the application process. This application’s design was for interfacing with Stanley’s Salesforce organization, and it required a Salesforce login to access the app and all of its features. The login ensured that anyone using that app is a part of the sales team at Stanley. 

Now, beyond the basic connective functionality, we needed to complete all aspects of the sales cycle through this app. This included allowing the sales team to send emails for clients with sales details and other information. To make that happen, we built an email tool using Apex and Visualforce. Stanley also wanted to close sales within the app, so we built in Adobe Sign functionality. Sales contracts could be signed digitally, and Zuora payment systems facilitated immediate payment. The final step was to synch the new data with the Salesforce organization.

The key technologies used in this project include:

  • Salesforce
  • Heroku
  • Postgres
  • React
  • Node.JS
  • Heroku Connect
  • Apex
  • Visualforce
  • Adobe Sign
  • Zuora

This project allowed us to work collaboratively with another development team to build different parts of an app. We’ve been able to successfully demonstrate our skill and ability to understand other’s work and apply it to our goals.

We’re looking forward to working with both Huge and Stanley again in the future. If you have a project that we can help you with, please be sure to let us know!

Learn more from our team here, or check out our custom development services.

Connecting Salesforce and Slack

We’re always looking for new challenges here at Oktana. One recent challenge that presented itself to us came from our partners, a leading investment firm. This investment firm out of California works with growth-stage companies in a wide variety of industries. They approached Oktana to help them find a solution to an efficiency problem within their organization. The primary tool that they used within the organization for work was Slack, and several different apps designed to interface with it. Their employees had to switch between Salesforce and Slack to manage updates and new tasks that would populate through Salesforce.

That’s where Oktana came in; the firm wanted a way to integrate Salesforce into their Slack experience to help save everyone at their company time and energy while they’re working. What could we do to bring these two platforms together? We started by exploring what tools might already exist within Slack that would make this integration quick and easy and found Incoming Webhooks. With Incoming Webhooks, we were about to take any new notifications from the Salesforce org about new task assignments and send them to users within the Slack instance.

This implementation was a success, and users were receiving notifications, but it was apparent that it wasn’t going to be the right solution for the long term. There were severe limitations to what we could do with Incoming Webhooks. While it could bring in notifications from Salesforce, it wasn’t able to limit those notifications to those directly involved with the task and instead sent them indiscriminately to the entire team. Additionally, there was no way to talk back to Salesforce after you received a notification in Slack, Incoming Webhooks is a one-way street. As such, we decided that we would need to take a different approach to solve this problem.

Thankfully, our partners at the firm were receptive to these concerns and were open to our recommendation for another option that might better suit their long-term needs. Since Incoming Webhooks did not fit our needs, there was only one course of action to take at this point. We needed to build a bespoke app to do the job. We created a small application in Node.js hosted on Heroku that would handle everything the investment firm required and more.

First, the app would replicate the functionality of the old implementation and take any task notifications from Salesforce and send them to Slack. Next, the app acts as a chatbot on Slack that can receive messages from Slack and send them back to Salesforce to update and create new tasks. Additionally, we built this app to be as lightweight and efficient as possible. At its core, the app is always listening to both sides, and when it detects something relevant, it translates the message and sends it from one application to the other. Oktana development process is about creating the most value possible for our clients. The lightweight nature of the app means it has space to grow and take on other functions so that the link between Salesforce and Slack can be expanded later on if needed. The app also can interface with applications beyond Salesforce if the need were ever to present itself.

The Critical technologies from this project:

  • Salesforce
  • Slack
  • Node.js
  • Heroku
  • Apex
  • Incoming Webhooks

This project was about seeing disfunction in how employees at the investment firm were working and finding a way to make it more streamlined. We saw that our client needed a solution for fixing their workflow, and we were able to accurately identify the problems as well as the best way to solve them. Now, they don’t have to move between Salesforce and Slack every time they want to update tasks, and we were able to face a new challenge head-on and solve it creatively.