not sure if it is cool but, purely out of spite, I'm building a LLM summarizer app to compete with a AI startup that I interviewed with. The founders were super egotistical and initially thought I was not worthy of an interview.
I've been through pretty tough times before and by several strokes of luck + hard work I'm kinda getting back to the path I want to follow in life. The below is what I would tell my teenage/early 20s self:
- Realize that some events are outside your control. If you were screwed over or unlucky in any way you need to move on from whatever happened and focus on what you can change
- Consistency is key. Just show up everyday and work towards your goal, over time you will see some positive results.
- Desire is suffering, if you're chasing a house, car or lifestyle realize that when you get it you'll just want something better. Try to be happy with what you have first.
- Positive reframing, your situation may not be that bad. It probably could've been alot worse right? Maybe your situation will force you to take action and be a better person
- Don't compare yourself to others, no one had the exact same path in life
- Success = working hard and being ready to take advantage when luck strikes
- Workout atleast 3 times a week, even if it's doing a home routine without any equipment
- Just be nice to people you work with, your network is your networth
Just for fun I wrote this prompt "vercel monopolizes nextjs by only allowing certain features on their platform such as"
ChatGPT4:
1. Incremental Static Regeneration (ISR): This feature allows developers to update static pages at runtime without having to rebuild the entire website. Vercel has optimized its platform to support ISR, making it an exclusive feature for Next.js applications deployed on Vercel.
2. Real-time Feedback: Vercel's platform provides real-time feedback during development, allowing developers to see the changes they make in their code instantly. This feature is exclusive to Vercel, making it a significant advantage for developers using Next.js on their platform.
3. Edge Functions: Vercel offers Edge Functions, which allow developers to run serverless functions at the edge of their network, providing low-latency responses to user requests. This feature is particularly useful for Next.js applications that require server-side rendering and is exclusive to Vercel's platform.
4. Preview Mode: Vercel's platform supports Next.js's Preview Mode, which allows developers to preview draft content changes without affecting the live site. This
I run a SaaS that makes between $1000-$2000/yr on a $5 VM. My operations are as follows:
On the VM:
- Nodejs + React SSR
- Nginx
- Certbot to manage my SSL cert
- Integrated with Grafana's cloud service (free tier)
Outside of the VM:
- Managed MongoDB cluster
- API health check's every 3 min with email alerts (I use multiple uptime services to check from different regions)
- DB backup cron jobs, backups are stored in 2 cloud providers
- Service desk for customer's to send queries/raise issues
- Alerts if CPU/RAM usage is too high (never got an alert for the past 2 years)
I also nuke the VM once a year and re-provision otherwise you have to maintain the OS, do cleanup etc.
Future work:
- Find way to backup my DNS records
- Probably need to monitor the SSL cert expiration in case certbot breaks
> nuke the VM once a year and re-provision otherwise you have to maintain the OS, do cleanup etc
That is really interesting. What are you using to re-setup your entire infrastructure after purging a VM? How do you manage the down time between one vm purge to setting up the next one.
I would love to know, going beyond the VPS what is your total
infrastructure + maintenance cost.
I set things up again on the new VM manually. I have a runbook for it, usually takes me 30 mins or less.
To not have any downtime I keep the old VM up and attach a new public IP to the new VM. I then update the DNS records and after a while when the new IP is mapped to my domain I then stop the old VM.
Costs:
Managed Mongodb cluster: $9 but I share it between multiple side projects so let's say $3
API health checks - free! I use digital ocean and fresh ping
Service Desk - free! I use Jira
DNS: Usually $0.3
DB backups: within the free tier on both cloud providers. I have it set to only keep the last x backups so this should always be free
Cron job to run the backup: I have a serverless function for this, still within the free tier
DNS - I use GCP as the domain was purchased with domains.google because I get free email addresses which I can receive and reply to from my personal gmail (e.g. support@saasapp.com). I'm not 100% sure if this setup will work with another DNS provider.
Docker Image - Since I'm running this most of the operation on AWS I use ECR
My chosen stack is React (DaisyUI, deployed with cloudflare) + Node (Hapi is batteries included, deployed using GCP cloud run). One benefit of this stack is that there's no cloud vendor lock-in. The only drawback thus far is that Hapi with Typescript is not that well documented and of course higher latency than dedicated infra.
I'm still unsure about what 'serverless' database is optimal (cockroachdb, neondb, planetscale, mongodb) so I went with what my last profitable side project used - mongodb.
At some point I'd like to compare the performance of psql jsonb to mongodb, I've watched some talks a few years ago stating that psql with jsonb outperforms mongodb. I wonder if that's still the case in 2023.
I've experimented with golang before as I wanted something easier to scale than node + minimal dependencies but then I realized I am just writing my own web framework so I settled on Hapijs, it's faster than express and has less dependencies, it was/is run in prod at Walmart.
I grew up obsessed with cars, I used to play racing video games almost exclusively, attend car shows etc.
I now work for a large german car manufacturer as a SWE. I cannot afford the cheapest car they make, it is literally more than I make in a year before tax. I don't own car yet and I'm not sure I will be able to afford one in the next 3-5 years. I don't even care that I (a former car nut) works for a car manufacturer when this would've been my dream job as a kid