Note: Prepare the sauce while the pasta is cooking to ensure that the spaghetti will be hot and ready when the sauce is finished; it is very important that the pasta is hot when adding the egg mixture, so that the heat of the pasta cooks the raw eggs in the sauce.
Put a pot of water on the heat and bring it to a boil. Add the pasta and cook until ‘al dente’ (about 8-10 minutes). Drain the pasta well and save about ½ cup of the starchy cooking water to use in the sauce.
Meanwhile, cook the pancetta in a pan with oil over medium heat. Cook it until it becomes brown and crispy (about 7-8 minutes).
Add the hot, drained spaghetti to the pan and toss for 2 minutes to coat the strands in the pancetta fat.
Beat the eggs with pecorino and parmesan (optional) together in a mixing bowl, stirring well to prevent lumps. Add salt and pepper.
Remove the pan from the heat and pour the egg/cheese mixture into the pasta, whisking quickly until the eggs thicken. Do this away from the heat to ensure eggs do not scramble.
Thin out the sauce with a bit of the saved starchy cooking water, until it reaches desired consistency.
Serve immediately, adding more pecorino to taste and freshly ground pepper.