Sobes.tech

Is it possible to explicitly allocate a variable on the stack or on the heap? How can you determine where the variable was allocated?

375

How was the Outbox Pattern implemented? What tool was used to send from the outbox table to Kafka?

305

What is the difference between VACUUM and VACUUM FULL?

268

Why Kafka, and not other systems?

245

How to estimate the effectiveness and usefulness of an index before adding it to production?

234

What transport protocol does gRPC use? What is the difference between HTTP/2 and HTTP/1.1?

218

What happens in PostgreSQL when a DELETE FROM table query is executed without conditions?

218

What information does EXPLAIN ANALYZE show?

215

What is the difference between SSL and TLS?

215

What are the differences between data types int32, int64, and simply int?

215

What happens if you close an already closed channel? What if you write to a nil channel?

211

What is a map in Go? How is it implemented under the hood? What happens during a collision?

209

What is Rate Limiting? What algorithms exist?

197

Tell me about an interesting problem you are proud of, any experience, difficulties.

190

// When updating an order, we need to send order data to multiple services (third-party APIs) // the number of services is growing (may be thousands+) // we wrote code, initially everything was fine, but over time our service started consuming a lot of memory func (s *orderService) SendOrder(ctx context.Context, hosts []string, order Order) { for i := 0; i < len(hosts); i++ { go func() { // Imagine this is a long network call response, err := s.httpClient.Send(ctx, hosts[i], order) if err != nil { s.logger.Error(ctx, "failed to send", err) return } s.logger.Info(ctx, "success", response) }() } }

Middle+
187

What are the ways to concatenate strings in Go? What is the difference between + and strings.Builder?

185

// We have a method for retrieving product information, this method is called very frequently // Are there any problems in this code and how to fix them? PostgreSQL database func (r *ProductRepository) GetProductDetails(ctx context.Context, productIDs []int) []Product { products := make([]Product, 0, len(productIDs)) for _, id := range productIDs { go func(id int) { var p Product query := "SELECT name, price, description FROM products WHERE id = $1" err := r.db.QueryRowContext(ctx, query, id).Scan(&p.Name, &p.Price, &p.Desc) if err != nil { r.logger.Error("error get product", "err", err) return } products = append(products, p) }(id) } return products }

Middle+
184

What are channels in Go? What types are there? How are they implemented under the hood?

184

What is Durability in ACID? How is it achieved in PostgreSQL?

183
/3