Stay organized with collections Save and categorize content based on your preferences.

SmartHR: Migrating to Google Cloud to build a modern serverless environment

About SmartHR

SmartHR, Inc. is one of Japan's leading unicorn companies. It is the number one HR cloud solution by market share for four consecutive years* with its "SmartHR" Labor Management Cloud service. The company has fully migrated its cloud platform to Google Cloud.

*Deloitte Tohmatsu MIC Research Institute "HRTech Cloud Market Status and Outlook FY2021"

Industries: Technology
Location: Japan

Tell us your challenge. We're here to help.

Contact us

Spurred by the end of its DBaaS solution, which had been the cornerstone of its services, SmartHR, Inc. chose to fully migrate its "SmartHR" cloud platform to Google Cloud, using Cloud Run and App Engine flexible environment to create a modern serverless environment that eliminates past issues.

Google Cloud results

  • Reducing learning costs with adoption of Cloud Run and App Engine
  • Implements seamless permission management and internal controls with Google Workspace accounts
  • Enables management control and security measures to be applied effortlessly using Terraform
  • Standardizes the technology stack for each product to allow development and operational knowledge to expand horizontally

Achieving a five-fold increase in processing performance with the adoption of Cloud Run

SmartHR, Inc. is one of Japan's leading unicorn companies. It is the number one HR cloud solution by market share for four consecutive years* with its "SmartHR" Labor Management Cloud service. The company has now fully migrated its cloud platform to Google Cloud.
*Deloitte Tohmatsu MIC Research Institute "HRTech Cloud Market Status and Outlook FY2021"

Munehiko Fujimura, of the Company-wide Operation Group, Cloud Infrastructure Unit, SmartHR, explains that there were several challenges that led to the full migration of SmartHR to Google Cloud. The main trigger being the DBaaS (Database as a Service), which has been used as a core part of the service, is expected to be terminated in the not-too-distant future. This prompted Fujimura to take the opportunity to resolve issues that had been piling up.

"One of the challenges involves internal controls. SmartHR handles extremely sensitive information from client companies, and so it holds SOC2 Type 1 certification (an external auditor's evaluation of the design of internal security controls, one of the Trust Service criteria established by the American Institute of Certified Public Accountants), but with a view to future expansion of the scale of development, we needed to create a state where management controls and security measures can be cleared with development team members' being aware," shares Fujimura.

Moreover, the initial architecture, which was created with an emphasis on speed when the company was first founded, was beginning to fray as the scale of the service expanded. The challenges presented by the growing load placed upon the development team and the system could no longer be ignored.

At the time, SmartHR was operating by connecting to various external management services from a cloud platform, but permissions were not properly established, presenting significant internal control and security challenges for a trusted execution environment. "The surrounding infrastructure had also grown so complex over the years that it had become difficult to keep track of what was running, who was making changes, when, what and how. Execution environments were also configured in different ways, making it difficult for development team members to achieve scale," says Fujimura.

To resolve these challenges, SmartHR, Inc. decided to migrate SmartHR to Google Cloud in October 2020.

"In building this architecture, we first focused on aligning the technology stacks of each product to facilitate sharing operational knowledge, and to enable the flexible scaling of development team members, which had been an issue. We also pursued a serverless configuration as close to a managed system as possible, in order to reduce the costs involved in its operation and focus on the core business of development."

Munehiko Fujimura, Company-wide Operation Group, Cloud Infrastructure Unit, SmartHR, Inc.

"We chose Google Cloud because, firstly, there is a huge range of options to run containers. SmartHR, Inc. has been developing and operating services using container technology on a fully managed service, so the ability to do the same is an essential requirement. Google Cloud offers a wide range of options to suit the situation, from Google Kubernetes Engine (GKE) to Cloud Run and App Engine. We were also drawn by the wide range of service components that can replace existing configurations and the complete set of tools to support their operations," he adds.

Other factors that support the transition, according to Fujimura, include the ease and security of managing and controlling permissions, with the Google Workspace accounts that have already been set up within the company, and the ease of integration with BigQuery and Looker, which the sales team was using.

Shortly after the decision was made, it was announced that the DBaaS service would end a year later, and migration of the SmartHR platform began.

One particular point of focus for Fujimura in migrating SmartHR was structuring the migration team. As the full-time transition project manager, Fujimura handles the overall grand design, with one to four people from each of the 10 or so development teams working on the transition. Individual products were transitioned in stages with involvement from the security team responsible for internal control, which was a major consideration during the transition.

"In this case we didn’t move forward in parallel all at once, but instead adjusted the schedule, taking into account the circumstances of each product. For example, the year-end adjustment function team, which had no time to spare before the year-end adjustment season, would move forward with the platform migration ahead of other teams. I was also responsible for gathering reviews from the product development and security teams, and emphasized getting hands-on to ensure horizontal knowledge-sharing," says Fujimura.

Even though a large number of team members were involved, this approach kept the team size small at any one point in time, and ensured smooth, lean development. The employee database function, which had a one-year time limit, was successfully migrated ahead of the deadline, and transition was generally completed for other functions. SmartHR, Inc. has also completed migrating peripheral functions linked to the employee database.

"Cloud Run was chosen for the front end because each SmartHR product was constructed as a simple Rails application before the migration, so we thought Cloud Run would be sufficient. GKE is more flexible and makes a greater range of things possible, but also requires a lot of customization and learning. With little time left before the migration, Cloud Run is the best choice because it has the spike tolerance required for the service, and does not involve high costs."

Munehiko Fujimura, Company-wide Operation Group, Cloud Infrastructure Unit, SmartHR, Inc.

Achieving high performance while reducing learning costs with Cloud Run and App Engine

Smarthr architecture
Enlarge the image

The diagram above shows the SmartHR architecture following its migration to Google Cloud. SmartHR consists of two major blocks, "Core," the employee database function, and "Plus (Applications)" which handles add-ons such as year-end adjustment functions and document distribution functions.

"In building this architecture, we first focused on aligning the technology stacks of each product to facilitate sharing operational knowledge, and to enable the flexible scaling of development team members, which had been an issue. We also pursued a serverless configuration as close to a managed system as possible, in order to reduce the learning costs involved in its operation and focus on the core business of development."

The adoption of a Cloud Run and App Engine flexible environment for containerized infrastructure typifies this approach. As Fujimura explains, "Cloud Run was chosen for the front end because each SmartHR product was constructed as a simple Rails application before the migration, so we thought Cloud Run would be sufficient. GKE provides more control while making a greater range of things possible, but also requires a lot of customization and learning. With little time left before the migration, Cloud Run is the best choice because it has the spike tolerance required for the service, and does not involve high learning costs. Conversely, App Engine was chosen for the back-end because of the need for long hours of high-load asynchronous processing, such as gathering employee information and creating document data. The REPL (SSH console) is needed because the service specification requires data to be examined using historical data and business logic."

Fujimura Munehiko
Munehiko Fujimura, Company-wide Operation Group, Cloud Infrastructure Unit, SmartHR, Inc.

SmartHR's migration to Google Cloud is almost complete. "The move to Google Cloud's modern serverless environment eliminated a whole set of issues we had been facing. Migrating the execution environment to Cloud Run greatly improved performance. The previous system could, at best, only handle 100rps, while the new system can handle 500rps with room to spare," says Fujimura.

Another point worth noting is that Terraform, which had previously been used to only manage some infrastructure configurations, is now fully adopted. "This yields significant results, including enabling the creation of an environment in which the development team can enable the company's recommended security settings simply by setting parameters. Once the migration is completed, we plan to build a QA environment, including a load test environment, so that each product can operate more reliably. It's also time to get serious about the data analysis infrastructure we built during the company's early days. Personally, I would like for us to try using tools like Cloud Spanner as our databases continue to grow," concludes Fujimura.

"The move to Google Cloud's modern serverless environment eliminated a whole set of issues we had been facing. Migrating the execution environment to Cloud Run greatly improved performance. The previous system could, at best, only handle 100rps, while the new system can handle 500rps with room to spare."

Munehiko Fujimura, Company-wide Operation Group, Cloud Infrastructure Unit, SmartHR, Inc.

Tell us your challenge. We're here to help.

Contact us

About SmartHR

SmartHR, Inc. is one of Japan's leading unicorn companies. It is the number one HR cloud solution by market share for four consecutive years* with its "SmartHR" Labor Management Cloud service. The company has fully migrated its cloud platform to Google Cloud.

*Deloitte Tohmatsu MIC Research Institute "HRTech Cloud Market Status and Outlook FY2021"

Industries: Technology
Location: Japan