본문 바로가기
카테고리 없음

웹페이지 어디에 배포 할까? (SSR, SPA)

by pishio 2022. 12. 27.

web page publishing

React를 기준으로 웹페이지를 어디에 배포 하는게 좋을까?

내 서버에 배포를 하는 것은 추천하지 않는다.

플랫폼을 활용 하는것이, 비용이나 유지보수 면에서 이점이 많다.

 

싱글 페이지 애플리케이션(Single Page Application, SPA)

Github pages (https://pages.github.com/)

먼저 깃헙 페이지이다.

깃헙은 코드 저장소로 이미 익숙해서 인지, 깃헙 페이지에 블로그를 운영하는 분들을 많이 볼 수 있다.

 

먼저 리밋을 살펴보면 아래와 같다.

bandwidth limit of 100 GB per month. 

토이 프로젝트로 사용하기에 bandwidth 100GB면 충분하다.

Usage limits

GitHub Pages sites are subject to the following usage limits:

  • GitHub Pages source repositories have a recommended limit of 1 GB. For more information, see "What is my disk quota?"
  • Published GitHub Pages sites may be no larger than 1 GB.
  • GitHub Pages sites have a soft bandwidth limit of 100 GB per month.
  • GitHub Pages sites have a soft limit of 10 builds per hour. This limit does not apply if you build and publish your site with a custom GitHub Actions workflow
  • In order to provide consistent quality of service for all GitHub Pages sites, rate limits may apply. These rate limits are not intended to interfere with legitimate uses of GitHub Pages. If your request triggers rate limiting, you will receive an appropriate response with an HTTP status code of 429, along with an informative HTML body.

If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from GitHub Support suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other GitHub features such as releases, or moving to a different hosting service that might better fit your needs.

 

Cloudflare Pages (https://pages.cloudflare.com/)

간단히 살펴보기 전에, Cloudflare Pages를 추천한다. (delog.io는 cloudflare pages에 배포되어 있다.)

Github과 연동해서, 자동 배포가 가능하다.

 

가장큰 특징은 Free plan에서도  Badnwidth제약이 없다.

(SSR은 배포가 안된다.)

cloudflare pages pricing

 

 

 

 

 

서버 사이드 렌더링 SSR(Server Side Rendering)

서버사이드 렌더링은 https://vercel.com/ 이 좋았다.

깃헙과 연동이 되어, 머지 되면 자동으로 배포까지~ 너무 편하다.

 

dev, prod 브랜치를 분리시, dev에만 적용해서 확인하고 prod에 최종으로 배포가 가능하다.

 

무료 구성인 Hobby를 보면 Bandwidth가 100GB로 제약이 있다.

vercel pricing for hobby

취미 용으로 배포를 해보기에는 충분한 구성이라고 생각되고, 

서버사이드 렌더링 배포로 next.js와 vercel이 조합이 너무 좋기 떄문에 다른 선택지는 고려하지 않았다.

 

 

web3 서비스를 어디에 배포할지로 결론을 내본다면,

Cloudflare Pages에 배포 하는게 이점이 많다.

 

댓글