My databases (mongodb
and mysql
) are declared as StatefulSet
in yaml
files. Backend framework is django
. If I define functions that perform write operations (edit or delete) as async
, it gonna be thread safe, right? Should I use locks or mutexes?
Asked
Active
Viewed 180 times
-2

Milo Lu
- 3,176
- 3
- 35
- 46
-
What does thread safety have to do with kubernetes? – D. SM Feb 18 '21 at 04:55
1 Answers
0
The same way you would do it anywhere else. MySQL offers many flavors and modes of transactional safety, which you use depends on your data structures and needs. Mongo is a little less complex but offers plenty of at least hypothetically transactional options.

coderanger
- 52,400
- 4
- 52
- 75