# edge-sql : 서버리스 SQLite

> Clean Markdown view of GeekNews topic #3613. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3613](https://news.hada.io/topic?id=3613)
- GeekNews Markdown: [https://news.hada.io/topic/3613.md](https://news.hada.io/topic/3613.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-01-21T12:55:04+09:00
- Updated: 2021-01-21T12:55:04+09:00
- Original source: [sql.lspgn.workers.dev](https://sql.lspgn.workers.dev/)
- Points: 10
- Comments: 2

## Topic Body

- Cloudflare Workers 에 WASM으로 SQLite를 임베드하고 Workers KV에 데이터를 저장

- 서버리스 펑션을 원격 DB처럼 사용

ㅤ→ SQL을 직접 리모트로 호출해서 데이터를 읽어오는 방식

- 읽기전용 데이터셋을 REST API대신 쓰고자 할때 이용가능

* 예제 데이터는 유럽중앙은행의 환율 데이터

## Comments



### Comment 4265

- Author: chiwanpark
- Created: 2021-01-21T13:28:01+09:00
- Points: 3

SQLite의 WASM 컴파일 결과물을 쉽게 쓸수 있도록 만든 sql.js 패키지도 있습니다. https://github.com/sql-js/sql.js

### Comment 4262

- Author: xguru
- Created: 2021-01-21T12:55:09+09:00
- Points: 3

SQLite DB자체는 원래 정말로 서버가 없는 Serverless 입니다만, https://www.sqlite.org/serverless.html

여기서의 서버리스는 Function as a Service 위에서 SQLite 를 올리는 방식 입니다.

다양한 용도로 사용가능 할 것 같아요. 특히나 지연시간이 거의 없는 Cloudflare 의 Workers 에 잘 맞을듯

Workers는 일 10만 쿼리, 분당 1000리퀘 제한이라서 간단한 API용도로 충분히 사용가능합니다.

https://developers.cloudflare.com/workers/platform/limits
