NuLab Offices
Case Study

Nulab

How the productivity software company Nulab boosted its own productivity with microservices and Kubernetes

Challenge

Nulab, which builds productivity software, found its own productivity was hampered by the monolith legacy Java application for its diagramming product, Cacoo. “The technology we were using was too old,” says Software Engineer Jay Chen. “It was really difficult to find all the possible bugs in our system since Cacoo was growing too huge. It was really scary for us since we had to deploy and see how it goes.” Adding new features took too long. Plus, as the company expanded to offices on three continents, engineers needed to be able to develop the same application across time zones.

Solution

Nulab began breaking down its monolith into microservices and chose Kubernetes for orchestration.

Impact

Deploying new code to production is six times faster: 6 minutes, down from 40 minutes. “That was a big difference,” says Chen. “Before microservices, for every small change we had to wait for an hour to deploy.” Kubernetes has also improved reliability: “Our SRE team doesn’t have to keep logging into our server to check why the server is down, and then restart the server,” he says. “Kubernetes manages those things. It’s self-healing. If the microservice is down, it’s just restarting automatically without any downtime.”

Challenges:
Industry:
Location:
Cloud Type:
Product Type:
Published:
August 5, 2020

Projects used

Envoy
gRPC
Kubernetes
Prometheus

By the numbers

Deploying new code to production

6 times faster

Deployments

Went from 40 minutes to 6 minutes

Onboarding new engineers

Takes a day instead of a week

The company behind the online project management and bug tracking software Backlog, the cloud-based diagramming software Cacoo, and the chat app Typetalk, Nulab serves 4 million users around the world.

“Our mission is to make productivity fun and enjoyable for everyone, and that’s regardless of where they’re working from,” says Bing Han, Head of Marketing. “A lot of our users have different international offices and are using our tools to help them communicate.”

But Nulab found its own productivity was hampered by the monolith legacy Java application for Cacoo that was hosted on AWS. “The technology we were using was too old,” says Software Engineer Jay Chen. A diagramming tool, Cacoo was built seven years ago on Java 6, and every version upgrade would take one engineer two weeks of full-time work and then another week of testing. “It was really difficult to find all the possible bugs in our system since Cacoo was growing too huge,” he says. “It was really scary for us since we had to deploy and see how it goes.”

The application was also difficult to scale up, making it hard to add new features or functionality into the system. “Every small change takes longer,” Chen says.

Plus, Nulab, which was founded in Japan in 2004, has in recent years expanded to offices on three continents. In 2017, Nulab’s technology leader set out to solve how engineers can work globally. The team determined that the solution was to break down the monolith into microservices written in Golang. “Microservices were absolutely necessary for members to develop the same application across time zones,” says Chen. The migration is about 80% done; there’s still one microservice using Java. “That’s the beauty of microservices,” he says.

For orchestration, the team considered Docker Swarm but decided to go with Kubernetes. “Kubernetes supported more of the functionality that we need,” Chen says. “Kubernetes has the API that’s integrated with all of the client, an user-friendly UI that we can just log in from our credential. And kubectl is a pretty useful command. This is really easy to use.”

The Nulab team rolls its own Kubernetes for Cacoo applications on AWS EC2 with kops. There is also other CNCF technology in the stack: Prometheus, Envoy, and gRPC.

With Kubernetes, Nulab has seen stellar results. Deploying new code to production is six times faster: 6 minutes, down from 40 minutes. “That was a big difference,” says Chen. “Before microservices, for every small change we had to wait for an hour to deploy.”

“Kubernetes has the API that’s integrated with all of the client, an user-friendly UI that we can just log in from our credential. And kubectl is a pretty useful command. This is really easy to use.”

— JAY CHEN, SOFTWARE ENGINEER AT NULAB

Kubernetes has also improved reliability: “Our SRE team doesn’t have to keep logging into our server to check why the server is down, and then restart the server,” he says. “Kubernetes manages those things. It’s self-healing. If the microservice is down, it’s just restarting automatically without any downtime.”

Microservices have, as expected, enabled Nulab’s distributed team to work more efficiently. “We are now able to assign all of the responsibility and ownership for each microservice,” Chen says. “So now we don’t really have the code merge conflict anymore. We can all work smoothly. It’s saving a lot of time for us as well.”

The new architecture, along with Kubernetes, has enabled the Cacoo team to introduce a new feature in the product: the event system, which sends a notification to all team members when a user updates a team’s diagram in Cacoo. Before, “it was difficult to build, so we postponed it,” Chen says. With the microservice architecture, “it was pretty easy to build up the whole flow to complete this feature.”

From day one on the job, Nulab’s software engineers now have a “much easier” experience, Chen says. “When we were using a monolith application, we needed to install Java and all of the product servers for each engineer. And the Java version was a really big issue for us. If the version is not exactly correct, then it failed to start. So every time we onboarded a new engineer, it took a week.”

“We are now able to assign all of the responsibility and ownership for each microservice. So now we don’t really have the code merge conflict anymore. We can all work smoothly. It’s saving a lot of time for us as well.”

— JAY CHEN, SOFTWARE ENGINEER AT NULAB

Now, it takes a day. Nulab uses Docker Compose for local development environments. “The new engineer only needs to clone one report, and everything will be installed into each container and brought up without any problem,” says Chen. “And for the engineer and the SRE team, it’s easier to manage. The kubectl command can solve everything.”

For others considering the move to microservices and Kubernetes, Chen has this advice to offer: “You cannot just remove your legacy app and just start to use microservices. You have to migrate slowly and see if each functionality is implemented correctly. So the best way to do this would be moving microservices one by one.”

And since Nulab is still in the process of migrating, Chen recommends using RabbitMQ to communicate between microservices and the legacy app. “I think this is a pretty good solution to keep using the legacy app without too much dependency between the legacy app and microservices,” he says.

Eventually, the Nulab team wants to be fully migrated into microservices so that the legacy app can be removed completely. Says Chen: “This will save a lot of money for us.” And that potentially could be true across the Nulab organization, as the Backlog project management tool is looking to migrate next. “At first we were just experimenting with this in Cacoo, and for us it’s really successfully done,” Chen says. “So we would like to move this solution to other teams across the whole organization.”