Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How freee has leveraged AWS for Growth

How freee has leveraged AWS for Growth

Yoshiyuki Asaba

April 25, 2024
Tweet

More Decks by Yoshiyuki Asaba

Other Decks in Technology

Transcript

  1.   2 • Personal Background ▪ Born in Tokyo, Japan,

    1978 ▪ I stay in the Philippines since 2022 • Work Experience ▪ 2003 - OSS programmer (PostgreSQL) @ SRA OSS, Inc ▪ 2008 - Software Development in Test @ Microsoft ▪ 2011 - Infrastructure @ GREE ▪ 2013 - Board member @ several startup companies ▪ 2015 -VP of Infrastructure @ freee ▪ 2022 - Manager @ Likha-iT • Interests ▪ Muscle training asaba VP of infrastructure => programmer Yoshiyuki Asaba
  2.   Mission Empower Small Businesses to Take Center Stage With

    the mission of "making small business the leading role in the world" freee develops and provides services with the aim of building an "integrated management platform that anyone can freely manage." We believe that a small business that can boldly and quickly embody ideas can generate various innovations and at the same time stimulate large companies to create a new movement in the world as a whole.
  3.   An integrated management platform that anyone can manage freely.

    VISION To develop and provide an "integrated management platform" to create an environment where anyone can manage freely and naturally. By integrating back office operations, automation and overall operational efficiency can be improved. Furthermore, by visualizing the entire management, to evolve into a platform that can execute smart and optimal actions that have never been seen before. In addition, as an open platform linked with external services, it responds to various business needs. To also strengthen the activation of mutual transactions within the user network. In addition to providing a platform, to promote changes in the world by making efforts to improve the environment of people involved in small businesses.
  4. June 2018 June 2019 June 2016 June 2017 June 2020

    The number of paid companies The number of paid user companies(1) To 470,000 June 2021 45.1万 June 2022 ※(1) As of 2023/12/31. It also includes sole proprietors. 37.9万 29.3万 22.4万 16万 12.1万 8.3万 Efforts to expand the user base 47.2万 June 2023
  5. 8 Evolutionary Trajectory: Products and Teams Product Release freee Accounting

    API release Service split start Introducing a team system Cloud ERP concept announce ment Microservi cing start Infrastructur e investment acceleration Platform first year New products acceleration Global develop ment freee HR freee Founding freee Opening freee Tax Filing freee finance lab Established freee App store freee Project manageme nt freee Card Unlimited
  6. 9 Layer 2012 - 2013 Present Backend Ruby Rails3.2 Ruby

    Go Rails 7.x Web Frontend CoffeeScript Backbone.js Sprockets TypeScript JavaScript (Flow) React Vite / webpack Mobile Application - - Swift / Kotlin SwiftUI / Jetpack Compose Infrastructure Heroku -> AWS Chef AWS Kubernetes Terraform Data Platform - - Python TensorFlow BigQuery Evolutionary Trajectory: Technology Stack Technology replacement is almost complete in all areas. Rails from 3.2 to 7.x.
  7. 11 Two major categories of challenges faced from early stage

    Improving System Scalability - The number of users and data size were increased on a daily basis - Security - Reliability Improving Organizational Scalability - A lot of new services and teams were emerging. - Unspoken rules were increased over time. - Reducing the cost of onboarding new employees is crucial. We are still working on these two issues, but I would like to introduce how freee has been resolving them.
  8. 12 Speed is also important for startup companies including freee.

    Lean Startup Lean startup is a clear set of principles to create and design startups under limited resources and tremendous uncertainty to build their ventures more flexibly and at a lower cost. It is based on the idea that entrepreneurs can make their implicit assumptions about how their venture works explicit and empirically testing it … - find a problem worth solving, then define a solution - engage early adopters for market validation - continually test with smaller, faster iterations - build a function, measure customer response, and verify/refute the idea - evidence-based decisions on when to pivot by changing your plan's course - maximize the efforts for speed, learning, and focus https://en.wikipedia.org/wiki/Startup_company
  9. 13 1. Service Infrastructure on AWS 2. Data Platform on

    AWS 3. Service Development Environment on AWS 4. Business Operation Environment on AWS 5. Corporate Infrastructure on AWS Contents
  10. 14 Fundamental ideas - freee uses managed services as much

    as possible (RDS, SQS, Elasticache, …) - All operations should be automated - Because the SRE team has been smaller than the service teams. Issues during growth 1. service infrastructures for each service were slightly different. - It was hard for both SRE members and service engineers to understand all service infrastructures because each infrastructure was slightly different. - We had to prepare for a deploy tool for each service. 2. RDBMS became a bottleneck Service Infrastructure on AWS
  11. 15 Kubernetes(K8s) and AWS EKS - Kubernetes provides us with

    a framework to run distributed systems. - EKS is a managed K8s service in AWS - K8s resources are defined using Helmfile . - Before EKS, freee used EC2 and capistrano mainly. Modernization and standardization of infrastructure Image build pipeline - Docker build and docker push are executed on GitHub Actions self-hosted runner. Deployment - Argo CD
  12. 16 - Initially, freee used Amazon RDS for MySQL, but

    gradually switching to Amazon Aurora improved the stability of our service. - For some data, freee is using ElastiCache, OpenSearch Service, and DynamoDB to improve throughput. Storage Layer Of course, changing the middleware doesn't solve everything, so further improvements are ongoing at the application and infrastructure layers.
  13. 17 freee uses various services (WAF, GuardDuty, Security Hub, AWS

    Config and so on) for security purpose. Security PSIRT team monitors logs on SIEM (Security Information and Event Management)
  14. 18 Data Platform on AWS - Data is important to

    make a decision for service improvement. - But data pipeline was getting heavy because the amount of data was huge. - Especially masking data was heavy. - Replaced with AWS Glue - Query engine was also heavy - We are using both Athena and BigQuery Other SaaS Log files
 ProductDB
 RDS / Aurora
 Glue
 DataLake
 (parquet)
 ECS
 
 Athena
 BigQuery
 Batch
 BI tool
  15. 19 Issues • It's getting difficult to set up development

    environment • It requires quite a bit of resources like CPU and memory ◦ High-end model of MacBook is expensive… • → As the number of engineers increases, the ease of setting up the development environment significantly impacts productivity Service Development Environment on AWS
  16. 20 Architecture - Prepared a separate AWS account for the

    development environment - Developers can log in the AWS console with SAML. - EC2 (Linux) - R-series instances are often used because devs need to launch lots of services. - Each service is running on Docker (docker-compose) - Docker images are pushd when the main branch is updated. - Connect ec2 via ssh or ssm - Visual Studio Remote Development is useful. - https://code.visualstudio.com/docs/remote/remote-o verview - Devs can also access with web browther via ssh port forwarding. Solution: Development environment on AWS
  17. 21 Many of freee users uses our service for final

    tax return and it's the peak season for the customer support team. The support team uses AWS WorkSpaces instead of procuring Windows PCs during the final tax return season. Business Operation Environment on AWS
  18. 22 freee corporate IT team manages employee accounts and VPN

    servers Solution - Running Windows Server instances for Active Directory - Synchronizing accounts with IDaaS (OneLogin) to be able to single sign on each cloud service via SAML. - Managing client PCs using Group Policy in Windows Server - Running GlobalProtect EC2 instances bought in AWS marketplace Corporate Infrastructure on AWS By using AWS in this way, we can build the corporate infrastructure without having to maintain on-premises servers
  19. 23 1. AWS provides several approaches to address challenges -

    It's totally acceptable to start with a light approach rather than setting up a grand system from the beginning - For example, Using ECS instead of EKS - Conversely, it's good to anticipate that there will be several opportunities to recreate your infrastructure. - It may be considered technical debt but it's natural for needs to change as phases shift. - It is necessary to be prepared to continue investing not only in feature development but also in infrastructure development to some extent. 2. B2B SaaS is well-suited to AWS's scaling mechanisms because it allows for predictable traffic patterns - Easy to set up autoscaling based on time schedule. key takeaways from operating freee(B2B SaaS)
  20. 24 3. Designing data is the most challenging aspect for

    each web-service provider - It does not depend on AWS. - Conversely, we can focus on service development by leveraging AWS's infrastructure. key takeaways from operating freee(B2B SaaS)