Skip to content

Commit

Permalink
add section breaking down costs to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanniser committed Nov 12, 2024
1 parent e4ece4e commit bc3f0c3
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,61 @@ A highly performant e-commerce template using Next.js and AI generated content b
[PageSpeed Report](https://pagespeed.web.dev/analysis/https-next-faster-vercel-app/7iywdkce2k?form_factor=desktop)

<img width="822" alt="SCR-20241027-dmsb" src="https://github.com/user-attachments/assets/810bc4c7-2e01-422d-9c3d-45daf5fb13ce">

### Costs

This project is hosted on Vercel, and uses many of the features of the Vercel platform.

Here is the full breakdown of the cost of running this project from Oct 20th 2024 through Nov 11th 2024.

During that time, the project recieved **over 1 million page views** across 45k unique users. The site has **over 1 million unique pages and images\***.

\*_images are unique by url (and caching) although not unqiue in their content_

#### Summary:

- ~1 million page views
- ~1 million unqiue product pages
- 45k unique users
- $513.12

Is $500 a lot for hosting this site? It depends, in this instance if it was a real ecommerce site that hosting cost would've been made back in the first 10k visitors.

It is likely possible to optimize these costs further if that is your goal, however that wasn't a priority for this project. We wanted to try and build the fastest possible site, quickly. We definitely achieved that goal without ever having to think about infra once.

These numbers are also on top of the Vercel pro plan, which is $20/contributor/month.

We would like to thank Vercel for covering the costs of hosting this project.

#### Compute and Caching

These costs represent the core functionality of serving the site.

| Resource | Included | On-demand | Charge | Notes |
| -------------------- | --------------------------- | ------------- | ------- | ------------------------------------------------------------------------------------- |
| Function Invocations | 1M / 1M | +31M | $18.00 |
| Function Duration | 1,000 GB-Hrs / 1,000 GB-Hrs | +333.7 GB-Hrs | $33.48 | Using In-function Concurrency reduces our compute usage by over 50% (see image below) |
| Edge Requests | 10M / 10M | +93M | $220.92 | |
| Fast Origin Transfer | 100 GB / 100 GB | +461.33 GB | $26.33 | |
| ISR Writes | 2M / 2M | +12M | $46.48 | |
| ISR Reads | 10M / 10M | +20M | $7.91 | |

Total: $353.12

#### Images

These costs represent the image optimization done by Vercel.

| Resource | Included | On-demand | Charge | Notes |
| ------------------ | ----------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Image Optimization | 5000 / 5000 | +101,784 | $160.00 | This represents the number of distinct source images used on the site and optimized by Vercel. Each of the 1 million products has a unique image. The reason this number is less than 1 million is because the optimization is done on demand and not all pages have been visited. |

Total: $160.00

#### Even More Info

![image](https://gist.github.com/user-attachments/assets/384939eb-6e69-4bb8-bdad-8e5b6790093a)

![image](https://gist.github.com/user-attachments/assets/497b77fe-c2bd-43c4-beeb-7498b9020bde)

![image](https://gist.github.com/user-attachments/assets/d8a9bfc4-b7d9-42b9-9a41-6db73e72d4f8)

0 comments on commit bc3f0c3

Please sign in to comment.