1. For multiples processes use `gunicorn` [1]. Runs your app across multiple processes without you having to touch your code much. It's the same as having the n instances of the same backend app where n being the number of CPU cores you're willing to throw at it. One backend process per core, full isolation.
2. For multiple threads use `gunicorn` + `gevent` workers [2]. Provides multiprocessing + multithreaded functionality out of the box if you have IO intensive. It's not perfect but works very well in some situations.
3. Lastly, if CPU is where you have a bottleneck, that means you have some memory to spare (even if it's not much). Throw some LRU cache or cachetools [3] over functions that return the same result or functions that do expensive I/O.
[1]: https://www.joelsleppy.com/blog/gunicorn-sync-workers/
[2]: https://www.joelsleppy.com/blog/gunicorn-async-workers-with-...
This will load up multiple processes like you say. OP loads a large dataset and gUnicorn would copy that dataset in each process. I have never figured out shared memory with gUnicorn.
"If you see a sudden drop in visits from Android, it is likely because you have a significant population of users on Android 7.0 or earlier. We encourage you to provide the same advice to them as we provided above."
Good luck doing that.
If you want to continue serving your clients, you can still pay for a certificate from an authority trusted by your outdated clients. If you want to continue serving the old clients for free, ask them to use another free browser that will allow them to do so.
It's called Stocketa. Here's the site: https://stocketa.com/
and I opened up a few hundred Testflight spots if you want to play with it:
https://testflight.apple.com/join/3dZwTVhS
Unfortunately despite the insane amount of time I've spend on it (many, many weeks with 20 hours on it) I've lost interest. It's just so hard to find quality stock/financial data that allows commercial use which I'd need to put this in the app store and charge for it. I pay a few hundred a month now for data that always has issues, APIs that don't work consistently, staff that's unresponsive/rude when I tell them their API doesn't work or is wrong. I've dealt with 3 stock data providers already and I still had to build a scraping engine to get certain bits of data. The real providers charge thousands per month for this data for good APIs, which I can't afford. All that and only for US data. International data was another headache I gave up on.
So yea, it's not a fun space to be in. If there was just a single API that was solid, worked and was not insanely expensive this would be a joy to work on. Polygon.io is the best API for this data but they don't understand indie developers and were telling me they had an amazing new plan for developers that was still close to $1k/mo.
Now I'm wondering if I should try to sell it to someone with more resources to build out.
I think ChatGPT is going to allow a lot of STEM majors to try out a double major/minor in the Humanities. This is assuming that ChatGPT remains cheaper to use than the cost of a textbook.
I know of a company near me that has $300M/year revenue (gross, not net) that sells cables and other equipment to ISPs in the region. It's owned by one person. I don't know their margins, but that person might be making $20M/year. They might be able to grow that business and sell it for $500M dollars if they play their cards right. I wouldn't call that a "lifestyle" or "small" business. It's somewhere in the middle.
I think it's the latter type that the article is referring to.
Highly available right until they are not. Nice to see that your data is worth 20 bucks to Hetzner. I always liked them but this is a bit rude to put it mildly.