Database Engineer
System and IT adminPosted 5 weeks agofrom Ahrefs's own hiring page
- Work type
- On-siteSan Francisco Bay Area, Boston, Cambridge, Singapore
- Experience
- Not stated
- Pay
- Not listedUsually $74k a yearSystem and IT admin, median, all levels, in the US (Payscale)
- Posted
- 5 weeks ago
Skills it mentions
Nice to have
Add your skills to see which ones you have.
About the job
Own the data layer behind one of the biggest crawlers on the web.
Ahrefs helps marketers get their brands found in search, in AI answers and on social. Under the product sits one of the largest datasets on the web, and someone has to keep it fast, correct and alive.
The team
The Database team owns our databases and storage end to end, from the source code to production. We run ClickHouse, MooseFS, SeaweedFS, TiDB and Elasticsearch on about 1,200 servers holding hundreds of petabytes, in data centres in Singapore, the US and the UK.
We don’t file tickets with vendors and wait. When a system doesn’t do what we need, we change its source, prove the change on production data and roll it out ourselves.
The job
You’ll build and run our data layer: ClickHouse, the MooseFS and SeaweedFS storage under it, and the TiDB and Elasticsearch clusters beside it. You write the code, you ship it, and you’re there when it meets production. You’ll work with AI coding agents as a normal part of the job.
Examples of what you’ll work on
- Build storage and query features in ClickHouse, such as replication over a shared file system, and storage policies that place data by its merge history.
- Keep up with upstream ClickHouse LTS releases, keep CI green and ship our own releases regularly.
- Make MooseFS and SeaweedFS highly available and durable: Raft-based metadata servers, follower reads, an intent log, automatic re-replication.
- Find performance problems in production profiles and fix them in the code, from query plans to FUSE clients.
- Trace data corruption to its root cause, even when it’s in compression, the memory allocator or the compiler, and repair the damaged data.
- Roll out releases and storage migrations across about 1,200 servers in three regions, without downtime.
- Run and tune TiDB, TiKV, TiCDC and Elasticsearch: scheduling, replication lag, backups, disk balance.
- Check risky designs with TLA+ and fault injection, and automate whatever repeats with watchdogs, balancers and dashboards.
- Build an SRE agent that watches our database clusters, diagnoses incidents and proposes fixes.
You’re probably right for this if
- You write strong C++, C and Rust, can work in Go, and feel at home in codebases of millions of lines.
- You know database storage engines deeply: merges or compaction, replication logs, query execution.
- You understand distributed consensus (Raft or Paxos) and what happens when things fail.
- You know Linux storage internals: page cache, fsync, FUSE, file systems, and how NVMe and HDDs really behave.
- You’ve run databases or storage on hundreds of nodes, and led the recovery when an incident hit.
- You debug with gdb, perf and sanitizers.
- You measure a change on production data before you call it a win.
Good to have
- Contributions to an open-source database or file system.
- OCaml. Much of our backend is written in it.
- Puppet or a similar configuration management tool.
Why Ahrefs?
We give smart people real ownership and don’t micromanage them. Here that means a few hundred petabytes and the source code of the systems that hold them. Small team, no layers of process, and the hardware to do the job properly. We value honesty, results and simple solutions over complicated ones.
Ahrefs does not engage with agencies or third-party recruitment providers for the roles we hire for. If we need help, we’ll let you know.
Location: Palo Alto (CA) or Cambridge (MA). On-site; you’ll need the right to work in the office you choose.
Ahrefs does not engage with agencies or third party recruitment solutions for the roles we hire for. If at any point we need help, we'll let you know!
Interested?Database Engineer at Ahrefs
Apply on company site (opens in a new tab)The job ad ends here
Interview questions for this job6 with answers, on Elasticsearch, C++, Rust and 3 more
Interview questions for this job
For the skills the ad mentions: Elasticsearch, C++, Rust, Go, Linux and Ansible.
difference between a field and the field.keywordElasticsearch
Update : A short answer would be that type: text is analyzed, meaning it is broken up into distinct words when stored, and allows for free-text searches on one or more words in the field. The .keyword field takes the same input and keeps as one large string, meaning it can be aggregated on, and you can use wildcard searches on it. Aggregatable means you can use it in aggregations in elasticsearch, which resembles a sql group by if you are familiar with that. In Kibana you would probably use the .keyword field with aggregations to count distinct values etc.
Please take a look on this article about
textvs.keyword.Briefly: since Elasticsearch 5.0
stringtype was replaced bytextandkeywordtypes. Since then when you do not specify explicit mapping, for simple document with string:{ "some_field": "string value" }below dynamic mapping will be created:
{ "some_field": { "type" "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } }As a consequence, it will both be possible to perform full-text search on
some_field, and keyword search and aggregations using thesome_field.keywordfield.I hope this answers your question.
From Stack Overflow: asked by tomak, answered by Piotr Pradzynski (CC BY-SA 4.0)
What is The Rule of Three?C++
Introduction
C++ treats variables of user-defined types with value semantics. This means that objects are implicitly copied in various contexts, and we should understand what "copying an object" actually means.
Let us consider a simple example:
class person { std::string name; int age; public: person(const std::string& name, int age) : name(name), age(age) { } }; int main() { person a("Bjarne Stroustrup", 60); person b(a); // What happens here? b = a; // And here? }(If you are puzzled by the
name(name), age(age)part, this is called a member initializer list.)Special member functions
What does it mean to copy a
personobject? Themainfunction shows two distinct copying scenarios. The initializationperson b(a);is performed by the copy constructor. Its job is to construct a fresh object based on the state of an existing object. The assignmentb = ais performed by the copy assignment operator. Its job is generally a little more complicated because the target object is already in some valid state that needs to be dealt with.Since we declared neither the copy constructor nor the assignment operator (nor the destructor) ourselves, these are implicitly defined for us. Quote from the standard:
The [...] copy constructor and copy assignment operator, [...] and destructor are special member functions. [ Note: The implementation will implicitly declare these member functions for some class types when the program does not explicitly declare them. The implementation will implicitly define them if they are used. [...] end note ] [n3126.pdf section 12 §1]
By default, copying an object means copying its members:
The implicitly-defined copy constructor for a non-union class X performs a memberwise copy of its subobjects. [n3126.pdf section 12.8 §16]
The implicitly-defined copy assignment operator for a non-union class X performs memberwise copy assignment of its subobjects. [n3126.pdf section 12.8 §30]
Implicit definitions
The implicitly-defined special member functions for
personlook like this:// 1. copy constructor person(const person& that) : name(that.name), age(that.age) { } // 2. copy assignment operator person& operator=(const person& that) { name = that.name; age = that.age; return *this; } // 3. destructor ~person() { }Memberwise copying is exactly what we want in this case:
nameandageare copied, so we get a self-contained, independentpersonobject. The implicitly-defined destructor is always empty. This is also fine in this case since we did not acquire any resources in the constructor. The members' destructors are implicitly called after thepersondestructor is finished:After executing the body of the destructor and destroying any automatic objects allocated within the body, a destructor for class X calls the destructors for X's direct [...] members [n3126.pdf 12.4 §6]
Managing resources
So when should we declare those special member functions explicitly? When our class manages a resource, that is, when an object of the class is responsible for that resource. That usually means the resource is acquired in the constructor (or passed into the constructor) and released in the destructor.
Let us go back in time to pre-standard C++. There was no such thing as
std::string, and programmers were in love with pointers. Thepersonclass might have looked like this:Read the rest at the sourceFrom Stack Overflow: asked by fredoverflow, answered by fredoverflow (CC BY-SA 4.0)
What are Rust's exact auto-dereferencing rules?Rust
Your pseudo-code is pretty much correct. For this example, suppose we had a method call
foo.bar()wherefoo: T. I'm going to use the fully qualified syntax (FQS) to be unambiguous about what type the method is being called with, e.g.A::bar(foo)orA::bar(&***foo). I'm just going to write a pile of random capital letters, each one is just some arbitrary type/trait, exceptTis always the type of the original variablefoothat the method is called on.The core of the algorithm is:
- For each "dereference step"
U(that is, setU = Tand thenU = *T, ...)- if there's a method
barwhere the receiver type (the type ofselfin the method) matchesUexactly , use it (a "by value method") - otherwise, add one auto-ref (take
&or&mutof the receiver), and, if some method's receiver matches&U, use it (an "autorefd method")
- if there's a method
Notably, everything considers the "receiver type" of the method, not the
Selftype of the trait, i.e.impl ... for Foo { fn method(&self) {} }thinks about&Foowhen matching the method, andfn method2(&mut self)would think about&mut Foowhen matching.It is an error if there's ever multiple trait methods valid in the inner steps (that is, there can be only be zero or one trait methods valid in each of 1. or 2., but there can be one valid for each: the one from 1 will be taken first), and inherent methods take precedence over trait ones. It's also an error if we get to the end of the loop without finding anything that matches. It is also an error to have recursive
Derefimplementations, which make the loop infinite (they'll hit the "recursion limit").These rules seem to do-what-I-mean in most circumstances, although having the ability to write the unambiguous FQS form is very useful in some edge cases, and for sensible error messages for macro-generated code.
Only one auto-reference is added because
- if there was no bound, things get bad/slow, since every type can have an arbitrary number of references taken
- taking one reference
&fooretains a strong connection tofoo(it is the address offooitself), but taking more starts to lose it:&&foois the address of some temporary variable on the stack that stores&foo.
Examples
Suppose we have a call
foo.refm(), iffoohas type:Read the rest at the sourceFrom Stack Overflow: asked by kFYatek, answered by huon (CC BY-SA 4.0)
- For each "dereference step"
Will you accept my language change?Go
People often suggest improvements to the language—the mailing list contains a rich history of such discussions—but very few of these changes have been accepted.
Although Go is an open source project, the language and libraries are protected by a compatibility promise that prevents changes that break existing programs, at least at the source code level (programs may need to be recompiled occasionally to stay current). If your proposal violates the Go 1 specification we cannot even entertain the idea, regardless of its merit. A future major release of Go may be incompatible with Go 1, but discussions on that topic have only just begun and one thing is certain: there will be very few such incompatibilities introduced in the process. Moreover, the compatibility promise encourages us to provide an automatic path forward for old programs to adapt should that situation arise.
Even if your proposal is compatible with the Go 1 spec, it might not be in the spirit of Go's design goals. The article Go at Google: Language Design in the Service of Software Engineering explains Go's origins and the motivation behind its design.
From Go Frequently Asked Questions (CC BY 4.0)
What does
LC_ALL=Cbefore command do? In what cases it will be useful?LinuxIntermediateLC_ALLis the environment variable that overrides all the other localisation settings. This sets allLC_type variables at once to a specified locale.The main reason to set
LC_ALL=Cbefore command is that fine to simply get English output (general change the locale used by the command).On the other hand, also important is to increase the speed of command execution with
LC_ALL=Ce.g.greporfgrep. Using theLC_ALL=Clocale increased our performance and brought command execution time down.For example, if you set
LC_ALL=en_US.utf8your system opened multiple files from the/usr/lib/localedirectory. ForLC_ALL=Ca minimum amount of open and read operations is performed.If you want to restore all your normal (original) locale settings for the session:
LC_ALL=If
LC_ALLdoes not work, try usingLANG(if that still does not work, tryLANGUAGE):LANG=C date +%A MondayUseful resources:
From Test your Sysadmin Skills (MIT)
What do you know about our company?Behavioural
Employers want to see that you have a genuine interest in working for them by asking questions like:
- what do you know about our company?
- why do you think you're a good fit for our company?
- why do you want to work for us?
To prepare for questions about the employer, you need to research the company. You should look at their website and 'about us' pages to find out more about their products, services and values.
Show what you've learned about the company throughout the interview.From National Careers Service: interview advice (Open Government Licence v3.0)
Similar jobs
- Data Center Technician - Rapid Response Team 75% National TravelTEKsystems, Council Bluffs, on-siteToday
- Strategic Account Executive, Data Center Liquid CoolingClera, Remote in the USToday
- Structural Practice Lead, Data Centers - Remote (U.S.)AECOM, Remote in the USToday
- IT Operations SpecialistNex, Remote in the USToday
More like this: System and IT admin jobs in San Francisco Bay Area (131), Jobs in San Francisco Bay Area (9,193) and System and IT admin jobs in the USA (934)



