In a large bowl, combine the cornmeal, flour, baking powder, salt, and cayenne pepper (if using). Add the onion to the dry ingredients and give it a good mix. The onion is what gives hush puppies their iconic flavor, so don't skimp!
In a separate bowl, whisk together the buttermilk and egg until well combined.
Pour the wet ingredients into the dry ingredients and stir until just combined. If the batter seems too dry, you can add a bit more buttermilk. The consistency should be like a very thick pancake batter.
In a deep-fryer or large, deep saucepan, heat the vegetable oil to 375°F (190°C). If you don't have a thermometer, drop a small dollop of batter into the oil; it should bubble and float to the top.
Using a small ice cream scoop or two spoons, drop rounded tablespoons of the batter into the hot oil. Don't overcrowd the pan; fry them in batches.
Fry the hush puppies until they're golden brown, turning them as needed for even cooking. This should take about 3-4 minutes.
Remove the hush puppies with a slotted spoon and drain them on paper towels. Serve them hot with ketchup, mustard, ranch dressing, tartar sauce or a spicy honey dipping sauce.