Introduction of Web Platform

Author: @urahiroshi, Engineering manager of Web Platform team

The mission of Web Platform team

Web Platform team was originally created to maintain network infrastructure and session management service for Mercari JP web app. But we’re changing our mission to "Providing web microservice platform as a service for web products in mercari group".

Let me clarify the purpose of our mission. Mercari has a structure called "Camp" (https://engineering.mercari.com/en/structure/). Camp is cross-functional and each Camp has web frontend developers and mobile developers.
But there are several challenges for web development:

  • Compared with mobile apps, web apps require infrustructures to return HTTP response, but it requires additional cognitive load for web frontend developers to maintain infrastructures because many frontend engineers are not familiar with infrastructural knowledge like Kubernetes
  • There are cross-cutting concerns for web products and development teams, e.g., web authentication, session management and network routing

Our mission is to solve cross-cutting concerns for web products, reduce the cognitive load for web development, and finally improve the reliability, security and developer’s productivity.

Let me describe which kind of services we’re maintaining in the sections below.

Web Gateway service

Basically, each web product has its own web microservices, and web gateway locates in front of web microservices, and proxy requests to appropriate microservice.

Architecture of web-gateway

It’s not only for proxying, but also provides several network functionalities for web products, like below:

  • session affinity by cookie
  • canary release by cookie
  • rewrite request path
  • change HTTP headers
  • internal authentication for development environment

Web microservices are deployed to Kubernetes cluster and many of them use rolling update strategy for deployment. In this case, session affinity functionality can prevent the user’s request going to different versions of app while deployment, and canary release functionality makes it possible to verify new version’s behavior before releasing it to all users.

web-gateway consists of NGINX Ingress Controller. These configurations can be configured by Ingress and be able to customize for each web product.

Web Authentication service

We’re maintaining a web authentication service and it provides a "Mercari Login" feature for web products. It includes web frontend providing sign-in screen and sign-up screen, and related screen and features for them, eg. social sign-in/sign-up features (Google, Apple, Facebook), resetting password screen, and multi-factor authentication feature.

Also, we maintain backend and infrastructure for it, but most of work is related to frontend because we’re using single-page application architecture written in React and TypeScript, and we just maintain backend for frontend to call existing API to add some functionality for web, which is written in Go.

Architecture of web-auth

DevOps tools

We also provide several tools and infrastructures for development and operation of web products.

For example, we’re maintaining end-to-end testing infrastructure using Moon.
It’s deployed to our Kubernetes cluster, and provides API interfaces and browsers to execute browser automation scripts.
This end-to-end testing infrastructure makes it easy to manage scalability of end-to-end testing and access control for development environments to run end-to-end testing. Also, we maintain infrastructure to store test reports by using Allure.

Web development team uses this infrastructure via CI/CD, and executes end-to-end testing and visual regression testing for Pull Request environment and staging environment.

Architecture of e2e testing

Other works

Also, we’re collaborating with web frontend teams and designing network architecture, caching strategy, CI/CD configuration, SLI/SLO and On-Call management together.

We maintain some infrastructures required for web applications, too. For example, we’re maintaining dynamic rendering server infrastructure, which consists of Headless Chromium and return dynamically rendered HTML content for crawlers and bots.

We’re hiring!

As mentioned above, we work on a wide variety of services and handle a wide range of technical elements from web frontend to backend and infrastructure. We believe that these technical elements are necessary to understand the characteristics of web applications and provide services and infrastructure that match them, so that Mercari’s development team can focus on providing the features for users and improving the user experiences.
Not every individual member of the Web Platform team has all the knowledge, but each member has their own strengths, and by collaborating with each other, we can cover the team’s area of responsibility.
Therefore, our team is looking for members who are good at one of the areas such as web application development, Kubernetes, or networking, but also have an interest in technical areas that they are not familiar with, and are willing to try and learn.

If you’re interested in joining our team, please refer to our career page and apply!

  • X
  • Facebook
  • linkedin
  • このエントリーをはてなブックマークに追加