Skip to content

Migrate API Server to edge function #73

@Mini256

Description

@Mini256

This is an exploration task. I'm not sure if this can be completed.

Background

In the past year, more and more applications have begun to use the Severless architecture represented by Next.js + Vercel Serverless / Edge Function.In the initial architecture of the Ossinsight project, we still use "traditional" development and deployment methods:

  • Using Docusaurus as the basic framework for front-end deployment of SSG solutions
  • Develop independent API servers and deploy them into AWS EC2

In the ossinsight-next project, the front-end part has gradually migrated to the SSR architecture of Next.js. In addition, for the following reasons, I think we can start some explorations that migrate the API Server to the Edge Function.

  • Save money, try to remove EC2 machines other than performing background tasks (Import data from GitHub)
  • Improve the delay of the client to the server (mainly when the cache works)
  • TiDB Serverless Driver has been published, direct access to TiDB Serverless in Edge environments is now possible!

Tasks

  • Migrate queries API to Edge function #79
  • Migrate GitHub related API to Edge function
  • Migrate Data Explorer related API to Edge function
  • Migrate Web socket based API to ... (TBD)
  • Migrate light-weight cron job to ... (TBD)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions