Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't do blue-green deploys when you have no revenue. Downtime costs you nothing and at 3,400 visitors a day you'll be lucky to drop a single request while deploying.

Pre-compute and cache to reduce your need for beefy servers.

When you can run something on your machine or in the cloud, choose your machine.

EDIT: It's less about saving money and more about not spending it.

EDIT2: Forgot to mention: use SQLite.



Caching is, in general, a good thing. But it's worth thinking about how you do it. I recently sped up a large system by dropping the use of redis entirely - because it was being badly used.

During a single request there might be 50+ cache-lookups, each taking a round-trip to a remote redis server to fetch a single key at a time. Batching those up to a set/hash would have been more efficient, but the codebase had evolved in such a way as to make that difficult.

Instead of making 50+ redis fetches it turned out that just fetching all the stuff from the database was faster.

(There will be refactoring to batch up the key fetches, but for the moment there was a measurable increase in performance under current loads just by removing redis.)


Couldn't you have cached locally using something like ehcache?


Perhaps, yes. It was the latency of the network calls that was killing performance, so something local, or even redis on localhost, would have been better.


Why use SQLite?

My postgres process doesn't come close to using up enough resources to push me out of even the cheap VPS tiers and I don't have to worry about locking if there's a heavy write load.


Backing up an SQLite database is as simple as copying a single file. As long as nothing is writing in the file, you're good.


That's not a reason.

Plus setting up a nightly back up of any SQL database, regardless of creed, is like a 10 line cron job.


Some developers have never written a cron job.

I think the point here is, SQLite setup would provide satisfactory results at this scale.

If the choice is betweeen a PAAS database offering and SQLite, you can pick SQLite. If you have skills / are prepared for managing dbserver yourself, then do that.


Yeah, fair point. From a cost standpoint it's more about using the same server for your application and your database.


SQLite Really is a bit of a hidden gem.


Not really hidden when it is one of the most widely deployed pieces of software on the planet.


Sure, but as an underlying dependency for iOS/Android, it's pretty well hidden from casual users...


That's true for even a casual website user. They have no idea or care about the underlying database.

Every app developer is aware about SQLite.


I guess not in absolute terms, but it’s mostly overlooked for web apps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: