Remove any rind from the pancetta and finely chop it; finely grate the pecorino and parmesan and mix together.
Beat the eggs in a medium bowl and season with a little freshly grated black pepper; set aside.
Add 1 tsp salt to the boiling water, add the spaghetti and cook at a constant simmer, covered, for about 10 minutes until al dente.
Squash the peeled garlic cloves with the blade of a knife to bruise them.
While the spaghetti cooks, heat the butter in a large frying pan or wok and add the pancetta and bruised garlic.
Cook on medium for about 5 minutes, stirring, until the pancetta is golden and crisp; remove and discard the garlic with a slotted spoon.
Turn the heat to low under the pancetta; when the pasta is ready lift it from the water and add it to the frying pan with the pancetta, allowing a little cooking water to come with it.
Mix most of the grated cheese with the beaten eggs, keeping a small handful of cheese back for sprinkling.
Take the pan off the heat and quickly pour in the egg-and-cheese mixture, using tongs or a fork to lift and mix the spaghetti so the sauce thickens without scrambling.
Add several tablespoons of the reserved pasta cooking water as needed to keep the sauce glossy and saucy; season with a little salt if required.
Twist the pasta onto plates or bowls, sprinkle with the remaining cheese and a grating of black pepper, and serve immediately.
Tips
Finely grate cheeses and mix them before combining with the eggs to ensure even flavour.
Remove the pan from the heat before adding eggs to avoid scrambling and achieve a silky sauce.
Reserve some hot pasta water and add a splash if the dish becomes dry to revive the glossy sauce.