If data is dynamic and changes every 10 minutes, but is read by millions per minute — what approach should be taken?
Golang
Who was responsible for the contracts between services? Who was the owner of the contract and how did you modify it?
Did you live in one infrastructure or were different systems in different circuits?
What is the difference between HTTP/1.1 and HTTP/2?
How long have you stored data for deduplication? Up to what point did you realize it was a duplicate?
If we first read all data into memory and then read only, can we do without mutex? Does it make sense to use a map in such a scenario?
Why did you make exactly this many services? How was the choice made — to make a service or not?
Regarding the search status — how actively do you consider offers? Are there any offers or deadlines for their acceptance?
Tell us a little about yourself: what did you do at your last job, what were your main tasks, and tell us about a difficult or interesting task you managed to implement recently — what was it, what did you do, and what was the outcome.
```go Type User struct { ID int Name string } var ( dbHits int ) func getUserInfoFromDB(id int) User { time.Sleep(100 * time.Millisecond) dbHits++ return User{ID: id, Name: fmt.Sprintf("User-%d", id)} } func main() { var wg sync.WaitGroup for i := 0; i < 5; i++ { wg.Add(1) go func(i int) { defer wg.Done() fmt.Println(getUserInfoFromDB(i)) }(42) } wg.Wait() fmt.Println("DB hits:", dbHits) } ``` Fix the error in the code related to concurrent access to the dbHits variable.