Step 1 Melt half the butter in a medium pan over medium heat and add the onion and a four-fingered pinch (about one-fourth teaspoon) of salt. Cook, stirring until the onion is nicely caramelized, about 20 minutes.
Step 2 In a small saucepan over medium heat, melt the remaining butter. Add the shallot and a three-finger pinch (about one-eighth teaspoon) of salt and cook until some of the water has cooked out of the butter and it has stopped foaming, about 1 minute. Add the flour, stir to mix it with the butter, and cook until the mixture has taken on a toasted aroma, a few more minutes.
Step 3Gradually whisk in the milk and stir with a flat-edged wooden spoon or spatula, to make sure the flour doesn't stick to the bottom of the pan, until the sauce comes up to a simmer and thickens, a few minutes more.
Step 4Stir in a three-finger pinch of salt, the white wine vinegar, sherry, fish sauce, dry mustard, black pepper, nutmeg and cayenne or smoked paprika.
Step 5Add the onion to the sauce and stir until heated through, 1 to 2 minutes. Transfer the sauce to a blender and process until pureed, or puree in the pan with a hand blender.
Step 6Keep the sauce warm over low heat. You should have about 2 cups soubise.