<story><title>The Future of the Web Is on the Edge</title><url>https://deno.com/blog/the-future-of-web-is-on-the-edge</url></story><parent_chain><item><author>naiv</author><text>I would even say that for 99% of the existing websites a free oracle cloud instance with 4 cores and 24GB ram + cdn is more than enough.</text></item><item><author>jensneuse</author><text>Instead of &amp;quot;edge&amp;quot;, a lot of websites should just have 3 locations (us,eu,apac) with a non geo replicated Serverless database in each region. At least that&amp;#x27;s what we&amp;#x27;re building at WunderGraph (&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;wundergraph.com&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;wundergraph.com&amp;#x2F;&lt;/a&gt;). Edge sounds super cool, but if you take state and consistency into consideration, you just can&amp;#x27;t have servers across the globe that also replicate their state consistently with low latency. TTFB doesn&amp;#x27;t matter as much as correctness. And if stale content is acceptable, then we can also just push it to a CDN. Most importantly, you&amp;#x27;d want to have low latency between server and storage. So if your servers are on the &amp;quot;edge&amp;quot;, they are close to the user, but (randomly) further away from the database. Durable objcets might solve this, but they are nowhere near a postgres database. I think the &amp;quot;edge&amp;quot; is good for some stateless use cases, like validating auth and inputs, etc., but it won&amp;#x27;t make &amp;quot;boring&amp;quot; services, even serverless in &amp;quot;non-edge&amp;quot; Locations obsolete. You can see this on Vercel. Serverless for functions, server side rendering, etc. and cloudflare workers for edge middleware. But they explicitly say that your serverless functions should be close to a database if you&amp;#x27;re using one.</text></item></parent_chain><comment><author>systemvoltage</author><text>Here is my golden setup: Cloudflare Tunnels + All ports closed (except ssh) + bare metal server. You can scale to the moon with like a million active users on a couple of 16 core servers (1 primary, 1 hot failover). You don&amp;#x27;t need AWS. You don&amp;#x27;t need Terraform. You don&amp;#x27;t need kubernetes. Hell, you don&amp;#x27;t need docker because you know apriori what the deployment environment is. Just run systemd services.&lt;p&gt;99% of the startsup will &lt;i&gt;never&lt;/i&gt; need anything more. They&amp;#x27;ll fail before that. The ones that succeed have a good problem on hand to actually Scale™.&lt;p&gt;What we&amp;#x27;re seeing is premature-optimi...errr scaling.&lt;p&gt;Edit more context:&lt;p&gt;For Postgres, setup streaming replication between postgres and hot standby. You need a remote server somewhere to check health of your primary and run promote to your hot standby if it fails. It is not that difficult. Have cron jobs to back up your database with pgdumpall in addition somewhere on Backblaze or S3. Use your hot standby to run Grafana&amp;#x2F;Prometheus&amp;#x2F;Loki stack. For extra safety, run both servers on ZFS raid (mirror or raidz2) on nvme drives. You&amp;#x27;ll get like 100k IOPS which would be 300x of base RDS instance on AWS. Ridiculous savings and performance would be just astonishing. Run your app to call postgres on localhost, it will be the fastest web experience your customers will ever experience, on edge or not.</text></comment>
<story><title>The Future of the Web Is on the Edge</title><url>https://deno.com/blog/the-future-of-web-is-on-the-edge</url></story><parent_chain><item><author>naiv</author><text>I would even say that for 99% of the existing websites a free oracle cloud instance with 4 cores and 24GB ram + cdn is more than enough.</text></item><item><author>jensneuse</author><text>Instead of &amp;quot;edge&amp;quot;, a lot of websites should just have 3 locations (us,eu,apac) with a non geo replicated Serverless database in each region. At least that&amp;#x27;s what we&amp;#x27;re building at WunderGraph (&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;wundergraph.com&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;wundergraph.com&amp;#x2F;&lt;/a&gt;). Edge sounds super cool, but if you take state and consistency into consideration, you just can&amp;#x27;t have servers across the globe that also replicate their state consistently with low latency. TTFB doesn&amp;#x27;t matter as much as correctness. And if stale content is acceptable, then we can also just push it to a CDN. Most importantly, you&amp;#x27;d want to have low latency between server and storage. So if your servers are on the &amp;quot;edge&amp;quot;, they are close to the user, but (randomly) further away from the database. Durable objcets might solve this, but they are nowhere near a postgres database. I think the &amp;quot;edge&amp;quot; is good for some stateless use cases, like validating auth and inputs, etc., but it won&amp;#x27;t make &amp;quot;boring&amp;quot; services, even serverless in &amp;quot;non-edge&amp;quot; Locations obsolete. You can see this on Vercel. Serverless for functions, server side rendering, etc. and cloudflare workers for edge middleware. But they explicitly say that your serverless functions should be close to a database if you&amp;#x27;re using one.</text></item></parent_chain><comment><author>soperj</author><text>Nothing from Oracle is ever free.</text></comment>