Here are some of my thoughts on the matter:

1. The ships carrying expensive cargo should hire a team of armed guards for passage through the pirate zone. If there are tens of millions of dollars of cargo, $10K-50K for armed guards for the few days it takes to pass through the pirate zone is better than dishing out 3 million in ransom. Then drop the guards off at the nearest port and buy them a ticket home. Or put them onto another ship. The small boats/ships-that-don't-want-to-pay-for-armed-guards can tag along in a military convoy.

2. Attack the pirate coastal bases.

3. The pirate zone is too big for military ships to patrol, so use drone spyplanes.

4. Pay the warlords to suppress piracy in areas they control, like in Iraq. Sometimes you got to use the local thugs to enforce control.

5. Where possible, use lethal force to stage a rescue, like in the past few incidents. Sometimes the pirates win some, sometimes they lose some. A better mix than just automatic negotiation for ransom.