Nikita Melkozerov Profile
Nikita Melkozerov

@meln1k

Followers
1,269
Following
205
Media
41
Statuses
506

Backend engineer by day, indie hacker by night. Buiding in my spare time.

Hamburg, Germany
Joined November 2009
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@meln1k
Nikita Melkozerov
1 month
So I started using SQLite as a database for my side project, and I want to share my experience so far: 1. It is fast. Like really fast. My architecture is a monolith written in Go (this is intentional, I sacrificed scalability to improve my shipping speed), and this is where
98
139
2K
@meln1k
Nikita Melkozerov
1 month
how I squeeze 60K RPS out of SQLite on a $5 VPS: There are tons of tutorials on how to setup SQLite, and sometimes they contradict each other. Here is what worked for me. 1. Configuring PRAGMAs. We need to send the following PRAGMA commands right after opening the connection:
25
127
2K
@meln1k
Nikita Melkozerov
2 months
@siyabuilt It is really not. I'm thinking about writing a post, shall I do that? I would cover: 1. securing ssh 2. setting up a firewall 3. configuring unattended upgrades 4. VPN access with tailscale 5. dashboards 6. GH actions for deploying to VPS 7. zero-downtime deploy via systemd
26
5
276
@meln1k
Nikita Melkozerov
1 month
@levelsio Yes, this is the key performance ingredient. Otherwise reads and writes are blocked by each other and things become slow.
3
0
77
@meln1k
Nikita Melkozerov
2 months
We all heard those stories. Netlify billed someone $104k for a static website. Cara got $96,280 bill from Vercel after going viral. You want to be an indie-hacker, not an indie-bankrupt. What if I tell you that a $5 VPS can serve 5K RPS? Here is how you can set it up yourself:
8
15
62
@meln1k
Nikita Melkozerov
1 month
Important note: if you use synchronous = NORMAL with WAL your database won't be corrupted, but during a power loss the latest transactions could be rolled back. To fix that use synchronous = FULL, you will lose around 30% in write performance, but sqlite will sync the WAL after
3
0
38
@meln1k
Nikita Melkozerov
1 month
@StephanGarland I’m not saying I completely avoid joins, sometimes it’s just way too tempting to filter in the application and then query one more time. It’s good to have flexibility knowing that n+1 is not going to slow you down that much.
1
0
31
@meln1k
Nikita Melkozerov
5 years
I'm launching my blog today together with a new post about @FoundationDB cluster layout, classes, roles, and processes!
0
7
25
@meln1k
Nikita Melkozerov
5 years
I've released a stable (means it won't corrupt your data if you mount a single volume concurrently) version of the Block device layer for @FoundationDB ! With it you can magically add replication to a legacy application that doesn't support it.
0
7
22
@meln1k
Nikita Melkozerov
1 month
@NickLaptev I like being independent from vendors. Also I won’t get a surprise bill if someone decides to DDoS me.
3
0
22
@meln1k
Nikita Melkozerov
4 years
A month ago I started writing an interpreter from the using Rust (with zero prior Rust and interpreters knowledge), and today it became Turing-complete. Wow! What a journey! Thank you @thorstenball for writing this amazing book!
1
2
20
@meln1k
Nikita Melkozerov
1 month
How I create UI for my side-projects with (almost) no JavaScript. As a backend dev, I've never worked with modern Single Page Application (SPA) frameworks. They all seem to be way too complex for what I want. I don't want offline functionality. I don't want to have separate
2
1
20
@meln1k
Nikita Melkozerov
1 month
@minchoi network latency? never heard of it.
4
0
18
@meln1k
Nikita Melkozerov
1 month
@daniele_dll True, there is no replication, but streaming backups with 1s lag are fine for a lot of cases. In the worst case I will just refund my customer.
2
0
17
@meln1k
Nikita Melkozerov
1 month
Folks, keep your operating expenses low by hosting on a $5 VPS, and have a 9-5 job for infinite runway. Success is inevitable.
@ben_de_smet_
Ben De Smet
1 month
Fantastic lessons from @harjtaggar at the @ycombinator retreat. Let’s survive long enough and get lucky! 🚀
Tweet media one
12
55
681
1
1
17
@meln1k
Nikita Melkozerov
1 month
@AshConnell I use systemd socket activation to buffer incoming connections while my service is restarted. Also graceful shutdown to finish with the existing requests.
1
0
15
@meln1k
Nikita Melkozerov
1 month
@AhmedRouizi Not a particular framework, just a bunch of Go libraries stitched together. For http routing I use echo, and templ for server side templating. Frontend is done with htmx, tailwind and alpinejs.
2
0
15
@meln1k
Nikita Melkozerov
7 years
Today is my first day at @mesosphere . Really excited about that!
3
0
14
@meln1k
Nikita Melkozerov
5 years
New @mesosphere swag! Yay!
Tweet media one
0
0
13
@meln1k
Nikita Melkozerov
1 month
@JustADude404 markdown support would be great, yeah
1
0
13
@meln1k
Nikita Melkozerov
5 years
It was great to see so many people interested in Akka, Event Sourcing and how they play with @FoundationDB ! #ScalaConf2019
@ScalaConfRu
ScalaConf
5 years
From a report by Nikita Melkozyorov @meln1k ( @MOIAmobility ) we learned why the akka-persistence-cassandra plugin is not perfect and what to do about it. #ScalaConf2019
Tweet media one
Tweet media two
0
3
4
1
0
11
@meln1k
Nikita Melkozerov
26 days
When I have go, tailwind, alpinejs and htmx in a single .templ file.
@PatrickJS__
PatrickJS
27 days
when you create a Monorepo
Tweet media one
60
319
3K
0
0
12
@meln1k
Nikita Melkozerov
2 years
me: I'm going to build a new shiny NAS which will please my eyes every day. expectations vs reality:
Tweet media one
Tweet media two
1
0
11
@meln1k
Nikita Melkozerov
1 month
@rando_137 @StephanGarland Very true, but chances are this will never happen and I move on to the next project. However, this is a nice problem to have in the first place.
3
0
11
@meln1k
Nikita Melkozerov
2 months
@drewwilson Go + HTMX?
0
0
9
@meln1k
Nikita Melkozerov
1 month
@iavins true, and if you have a monolith you can ensure that you have a single writer.
0
0
9
@meln1k
Nikita Melkozerov
22 days
@yacineMTB A new addict is born every day.
2
0
8
@meln1k
Nikita Melkozerov
1 month
@Blue0lemming I think the main difference compared to a "traditional" db is that you can't talk to sqlite over the network. You need to have a direct access to the database file. That means you deployment is expected to fit on a single server. If this is not possible in your scenario, then
2
1
9
@meln1k
Nikita Melkozerov
3 years
Finally I found a fix for all the MacBook keyboard problems:
Tweet media one
1
2
9
@meln1k
Nikita Melkozerov
1 month
@aguynamedben Just go plus a bunch of libraries that I find useful. I like echo as an http router because of the amount of features available. I also use templ, htmx and alpinejs when it comes to UI.
0
0
9
@meln1k
Nikita Melkozerov
3 years
The best things in life are free: by Jeremy and Sylvain, by Yann LeCun & Alfredo Canziani, by OpenAI team, and @ykilcher YouTube channel.
0
0
8
@meln1k
Nikita Melkozerov
2 months
@siyabuilt @coolifyio Not that I use it in my setup, but I can include it in my post.
1
0
8
@meln1k
Nikita Melkozerov
1 month
@untalpablodz I did some tests, and I have to say it works just fine. But I do the following: I keep two connections open: one for reads and one for writes. Then I set go's connection limit on the „write“ connection to 1, and keep the read limit as high as it gets. By doing this I offload
3
0
8
@meln1k
Nikita Melkozerov
3 years
New blog post: Image Classification from scratch without a PhD. If machine learning still seems like magic to you, then after you read this post, the problem of image classification will be completely demystified.
0
1
8
@meln1k
Nikita Melkozerov
7 years
@backendsecret добавляй еще и наши :)
1
0
7
@meln1k
Nikita Melkozerov
1 month
@Akshat_Giri I prefer to keep things simple. I use GH actions that rsync the compiled binary to my VPS, and then systemd unit takes care of the restart process.
1
0
8
@meln1k
Nikita Melkozerov
6 years
Super excited to give a talk about @ApacheMesos and Marathon at DevOpsDays Kazan 2018!
Tweet media one
0
0
8
@meln1k
Nikita Melkozerov
2 months
You don't need netlify/vercel/railway/render/fly/heroku to automatically deploy when you push to main. All you need is: 1. a github action that builds your code and sends the artefacts to your VPS via rsync, 2. docker/systemd that restarts the application on update.
1
0
7
@meln1k
Nikita Melkozerov
7 years
@kaffeecoder @gustaf_nk In @ZalandoTech we developed a similar project, try to check it too:
0
2
7
@meln1k
Nikita Melkozerov
1 month
@dmi3k DuckDB is a great analytical database, however SQLite is better suited for small single-row transactional updates.
1
0
7
@meln1k
Nikita Melkozerov
1 month
Going to purge the last bit of supabase auth (and supabase in general) from my project. Local SQLite on nvme with replication to S3 is sooo good.
1
0
7
@meln1k
Nikita Melkozerov
1 month
@simonw Funny enough, I used exactly these articles for performance tuning :)
0
0
7
@meln1k
Nikita Melkozerov
2 months
Printed a new t-shirt
Tweet media one
Tweet media two
0
0
7
@meln1k
Nikita Melkozerov
8 years
One of the coolest things when working with #Akka is akka-testkit. The most awesome test tool ever! Thanks @akkateam for such a great job!
1
4
6
@meln1k
Nikita Melkozerov
3 months
ShipFast backend edition: Go monolith + SQLite + HTMX + Alpine + tailwind. Minimal complexity and friction. Feels like the good old PHP days are back and launching in a weekend is possible again.
2
0
7
@meln1k
Nikita Melkozerov
1 month
@pilotbob There are many options, depending on what your architecture is and how much time you’re willing to spend on that. Random ideas from my head: shard by users, replicate the WAL to make read replicas, use mvsqlite, completely drop SQLite and use something like foundationdb and do a
1
0
6
@meln1k
Nikita Melkozerov
2 months
storing json blobs in a database and de-serializing them with Go feels so good. every time I change the structure, nothing explodes in my face and then a default-initialized struct is returned. 10/10, period.
0
0
6
@meln1k
Nikita Melkozerov
3 years
@fmueller_bln I heard distributed systems are cool, so we built a distributed monolith.
1
0
6
@meln1k
Nikita Melkozerov
7 years
Writing recursive flows with #akka -streams feels like a superpower.
0
1
5
@meln1k
Nikita Melkozerov
21 days
When ZIRP is over but you're still hoping to get a job to design data-intensive applications.
Tweet media one
0
2
8
@meln1k
Nikita Melkozerov
2 months
Claude enables ultra-fast MVP development for more languages. Previously this was a niche occupied by Django, Rails, and Laravel because they have a nice CLI for generating CRUDs. In 2024 you can promt a complete SaaS in Go and HTMX in almost no time. What a time to be alive.
0
0
6
@meln1k
Nikita Melkozerov
2 months
Here's a sneak peek at what I've been working on lately - a service that creates promotional packets for software engineers to increase their visibility and chances of getting promoted.
1
1
6
@meln1k
Nikita Melkozerov
1 month
@NickLaptev Well, a fridge won’t suddenly change the monthly price, make a feature you rely on paid, or charge you 500 more for the electricity it consumes. The egress traffic costs of many serverless vendors are just ridiculously high, so you could get a hefty bill even on a moderate
1
0
6
@meln1k
Nikita Melkozerov
2 months
It was a mistake to start reading on German legal entity structures, taxes, and law compliance. The whole day is gone, and no product improvements has been made :(
0
0
6
@meln1k
Nikita Melkozerov
5 years
@backendsecret Напиши рекрутерам из Гугла :)
0
0
4
@meln1k
Nikita Melkozerov
1 month
Devs, want a promotion? 🚀 I'm building a service to help you showcase your impact and achievements. With AI assistance, we'll create a polished promotional package for your next 1:1 with your manager. Link in replies. 👇 Comment for free credits at launch!
5
2
7
@meln1k
Nikita Melkozerov
25 days
the best boilerplate is not something you can buy, but rather one you build yourself, bit by bit, from your project launches
1
0
6
@meln1k
Nikita Melkozerov
3 months
TIL: there is a thing called systemd socket activation, and it can buffer incoming connections while you're restarting your systemd unit. Zero-downtime deploys, yay!
0
1
5
@meln1k
Nikita Melkozerov
17 days
accurate
Tweet media one
0
0
5
@meln1k
Nikita Melkozerov
2 months
writing documents for performance reviews was pretty tedious for me in the past, so I decided to change that. dev folks, does it resonate with anything from your experience? cc @_buildspace @_nightsweekends
Tweet media one
1
0
5
@meln1k
Nikita Melkozerov
5 years
Excited to start my first day at @MOIAmobility ! The most important part, coffee machine is already figured out :)
Tweet media one
3
0
5
@meln1k
Nikita Melkozerov
2 years
Trained my first Atari 2600 agent with the help of @huggingface Deep Reinforcement Learning class! Isn't it adorable?
0
1
5
@meln1k
Nikita Melkozerov
9 days
just coded a persistent LLM prompt queue with rate limiting and load balancing across several inference providers. took 2 hours and 250 lines of code in total. monoliths in Go give you hyper-productivity.
2
0
5
@meln1k
Nikita Melkozerov
3 years
Hacking on projects outside for the first time this year!
Tweet media one
1
0
5
@meln1k
Nikita Melkozerov
2 months
@Keisinger Следующий уровень это перейти на эргономичный сплит
Tweet media one
1
0
5
@meln1k
Nikita Melkozerov
1 month
I reached the peak of server side templating today. I had go structs, arrays, html templates with HTMX and Alpine.js all in one .templ file. All type-checked. Locality of Behavior FTW!
2
0
5
@meln1k
Nikita Melkozerov
26 days
Did you know that by hosting on you give them license to use your data (whatever that means)? Something that will not happen with a good old VPS.
Tweet media one
2
1
5
@meln1k
Nikita Melkozerov
3 months
SaaS distribution be like
Tweet media one
1
0
5
@meln1k
Nikita Melkozerov
7 years
I think that @github should have 2 different buttons for approving pull requests: • One for "I don't see anything bad in this PR" • Another for "I confirm that this PR is correct" Although those statements might sound the same, there is a big difference between them.
0
0
5
@meln1k
Nikita Melkozerov
5 months
I fear not the man who has tried 10,000 frameworks once, but I fear the man who had applied one framework to 10,000 projects.
1
0
5
@meln1k
Nikita Melkozerov
4 years
New badge, yay!
Tweet media one
@github
GitHub
4 years
We’ve completed the deposit of all public repositories in the GitHub Arctic Code Vault to preserve open source software for generations to come.
78
734
3K
0
0
4
@meln1k
Nikita Melkozerov
1 month
@LotusHints Pretty much the same. Works fine for a monolith! For something more complex you would need an online schema migration, e.g. read from the old and a new table while migrating the data in the background.
2
0
4
@meln1k
Nikita Melkozerov
3 months
bought a domain name for my LLM wrapper. there is no way back now.
0
0
4
@meln1k
Nikita Melkozerov
28 days
It seems like I’m going to ditch Llama 3 and go full anthropic. I really wanted llama 3 to work, but no matter how I changed the prompt, I couldn’t get the writing style feel right. It always looked fake and AI-generated. Not the case with sonnet 3.5 though.
0
0
4
@meln1k
Nikita Melkozerov
5 months
Time spent reading docs: 1h Time spent building the thing: 1h Time spent writing React: 0s
0
0
3
@meln1k
Nikita Melkozerov
1 month
@CranQnow Hopefully next week. The product is 95% finished and I only need to polish the rough edges.
1
0
2
@meln1k
Nikita Melkozerov
1 month
I prepared 5 headlines for the landing page. Showed them to 10 friends, and next day deleted the messages. Asked my friends which one do they still remember. Almost everyone gave the same answer. Super cool trick by @marc_louvion
0
0
3
@meln1k
Nikita Melkozerov
3 years
How to accelerate turnover in your org: 1. Hire people from abroad and pay them a bare minimum above the visa requirements. 2. Wait until they realize that they have been treated unfairly cos the market salaries are 50% higher. 3. Tell them that "our max pay raise is 10% a year"
0
0
4
@meln1k
Nikita Melkozerov
2 years
@mr_mig_by это же пародийный аккаунт ютубера из шотландии, нет?
1
0
4
@meln1k
Nikita Melkozerov
1 month
@slecache I use strict tables but didn’t know about vacuum. Time to read the manual. Thanks!
0
0
4
@meln1k
Nikita Melkozerov
2 months
One of the best RoI skills to have as an indie-hacker might just be learning the basics of Linux admin. Linux existed 30 years ago, available now, and will exist in 50 years, unlike the VC funded serverless offerings. Bonus: you won't get a $100k invoice after a DDoS attack.
0
0
4
@meln1k
Nikita Melkozerov
4 years
Never thought I'd need to implement a vector clock myself, but it seems the time has come!
1
0
4
@meln1k
Nikita Melkozerov
1 month
@andrew_graaff only vertically with more cores/ram. but that's more than enough to validate the idea and serve quite a few users already.
2
0
4
@meln1k
Nikita Melkozerov
2 months
Is there a good UX/design book for a fellow backend engineer? I can easily design and deploy distributed systems to k8s, but my UIs look like... made by an engineer and I don't know why. Any hints highly appreciated!
2
0
4
@meln1k
Nikita Melkozerov
1 month
@androo777 @minchoi there is a thing called speed of light, not even starlink can help here if the remote worker is on the other side of the globe.
2
0
4
@meln1k
Nikita Melkozerov
2 years
Time to crank up the batch size!
Tweet media one
0
0
4
@meln1k
Nikita Melkozerov
1 month
@mr_ajfriesen Yes, on Hetzner you get a raw local disk.
1
0
4
@meln1k
Nikita Melkozerov
1 month
@ThePeterMick My FE stack of choice is HTMX and Alpine.js. Very simple, gets things done without much pain, and plays well with server side rendering.
0
0
2
@meln1k
Nikita Melkozerov
4 years
Akka streams discovery of the day: a really neat flatMapPrefix thing.
0
1
3
@meln1k
Nikita Melkozerov
1 month
@FEftersson25332 For dev/testing. Prod will be hosted on a $10/month VPS.
0
0
3
@meln1k
Nikita Melkozerov
2 months
@jonny555333 @siyabuilt I don’t deny that Vercel has better UX. But VPS gives you ownership and independence. You will only need 20-30 minutes to complete the list above, and you do it once during the server setup. Also, if you write it as an Ansible playbook, you can spin up a new VPS in seconds.
1
0
3
@meln1k
Nikita Melkozerov
1 month
@yar_vol Oh that’s just a synthetic test :) but at least it gives you an idea about the limits of SQLite
0
0
3
@meln1k
Nikita Melkozerov
1 month
It’s not “if you build, they will come”, but “if you share valuable stuff, they might want to know your better, start trusting you, notice your product, and if they’re in the market they might even buy it“.
0
0
2
@meln1k
Nikita Melkozerov
24 days
1
0
3
@meln1k
Nikita Melkozerov
1 month
A day without a shitpost - a day wasted.
2
0
3
@meln1k
Nikita Melkozerov
2 years
@hardmaru I like the dall-e 2 version.
Tweet media one
0
0
3