Sobes.tech

Which libraries are used to write metrics in Go?

206

What is the purpose of this code? What business-technical problem does it solve?

205

What are these metrics? What tools will we use to write these metrics?

182

// Task 4 // For a "typical" CRUD service - at some point, some methods started to work slowly and the service began to timeout. // The service consists of: // * Application Load Balancer (L7) - handling incoming requests and terminating TLS // * Backend (rest, Java/Kotlin or Golang) - processing incoming requests and business logic // * Database (Postgres) - storing and processing SQL queries // How to properly act to understand the cause of the problems and develop solutions to improve the situation?

177

// Task 3 // Describe what problem this code solves // What are the issues with this solution? // How would you rewrite this code?

163

// Task 3 // Describe what problem this code solves // What problems are there in this solution? // How would you rewrite this code? var c int type Trace struct { // Some fields here } type Sender interface { Send(Trace) } func Do(sender Sender, tr Trace) { c++ if c == 100 { sender.Send(tr) c = 0 } }

140

Your team’s priorities change daily, and new urgent tasks appear. What will you do about this?

136

What indices did you use at work? What did you apply in practice? In Wildberries?

136

How does partitioning work under the hood in PostgreSQL?

134

What to do with the database and load balancer when experiencing performance issues?

132

What indexes do you use in PostgreSQL?

130

What problems are there in code with a global counter? How to fix it?

128

How to access the pprof profiler on a production server?

127

On which graph did you see the problem when using pprof?

126

How to make an Increaser universal — not tied to the number 100?

121

// Task 3 // Describe what problem this code solves // What problems are there in this solution? // How would you rewrite this code? var c int var mu sync.RWMutex type Trace struct { // Some fields here } type Sender interface { Send(Trace) } func Do(sender Sender, tr Trace) { mu.Lock() defer mu.Unlock() c++ if c == 100 { go func() { sender.Send(tr) }() c = 0 } }

119

function normalize2(str []rune) []rune { result := str[:0] for val := range str { if val != ' ' { result = append(re) } } l, r := 0, 0 isSpace := false for i := 0; i < len(str); i++ { val := string(str[i]) if val == " " { if isSpace { continue } else { str[r] = val r++ isSpace = true } } else { str[r] = val r++ isSpace = false } } return str[:r] }

110

Can Increaser be an implementation of Sender? How does Increaser differ from Sender logically?

106

Can you describe how you designed and implemented REST and gRPC APIs for internal and external platform services?

101
/2