# Go 프로젝트를 EC2에서 Fly.io로 이관한 후기: 더 재미나고, 월 $9 절약

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

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=8604](https://news.hada.io/topic?id=8604)
- GeekNews Markdown: [https://news.hada.io/topic/8604.md](https://news.hada.io/topic/8604.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2023-03-03T11:08:01+09:00
- Updated: 2023-03-03T11:08:01+09:00
- Original source: [benhoyt.com](https://benhoyt.com/writings/flyio/)
- Points: 31
- Comments: 1

## Topic Body

- 2개의 사이드 프로젝트를 이관   
- 500줄 가량의 Ansible 스크립트와 설정파일을 지웠고, 월 $9를 절약  
- 스태틱 파일을 CDN을 사용하다가 go:embed를 이용한 ETag 캐싱으로 변경   
- CRON을 간단한 백그라운드 goroutine으로, 설정파일 대신 환경변수 이용   
- 앱 아키텍처는 동일. Go net/http 서버와 SQLite DB를 그대로 이용   
- Go 웹 앱이 운영이 쉽다고 하지만, 개발자가 신경써야할 자잘한 설정들이 많이 필요함(Caddy 를 이용한 SSL 및 업그레이드 등)  
  - 하지만 Fly.io로 하면 이런 일들이 필요없음   
- Fly.io 는 3개의 VM까지는 무료이고 그 이상은 VM당 월$2  
  - 1 Shared CPU 와 256MB 램인데, Go 앱에게는 충분함

## Comments



### Comment 15045

- Author: jin225675
- Created: 2023-03-03T11:19:38+09:00
- Points: 3

fly 애용하고 있습니다 ㅎㅎ  
5달러 미만 비용은 청구도 안하더라구요!
