As an entrepreneur, you're going to have to take on your fair share of competitors. Some will be anklebiters, others worthy opponents and-if you're lucky-you'll have to go head-to-head with a few giants. No, that's not a typo. Duking it out with Goliath isn't all bad. It's clear validation of your vision and product, it gives you the opportunity to differentiate yourself from a powerful, established player and you'll learn a thing or two about how to win.

Here are five strategies that enabled David to slay Goliath, and how you can use them to overcome a daunting competitor.

1. Don't let fear paralyze you. Before founding Okta in 2009, I was the head of engineering at Salesforce for six years. That's why when Marc Benioff announced that Salesforce was building an Okta competitor in 2012, many people asked me how it felt to have my former boss as competition. My answer? It was incredibly satisfying that one of the most important cloud companies saw the value of our solution. It was even more satisfying when two years later, Microsoft-the biggest software company in the world-debuted its Enterprise Mobility Suite, a bundle of services that compete directly with Okta.

When an established player enters your space, fear is the natural first reaction. But you shouldn't let it paralyze you. In fact, it should lead to a feeling of validation and achievement that propels you forward. When you get the attention of the big guys, you're clearly doing something right and you should keep going.

2. Choose your weapon wisely (hint: choose your customers). Large companies have a knack for locking customers in. Since they have so many products, they will often sell you on one and stick you with another, adding arbitrary licenses and pandering to your CFO along the way-evidence that they care more about your bill than your success. When competing with an established giant, you have to differentiate yourself. The crucial weapon? David's was his sling and stones, and for any underdog in business it's customer success. Make customer success-the belief that if your customers are successful, so are you-a company value and celebrate customers who love your product. Put the customer first and your competition will fall behind.

3. Aim precisely. If you find yourself suddenly competing with the likes of Microsoft, Oracle, IBM or VMware, it's important to remember they offer a vast array of products and can't devote extensive resources to just one. As a smaller company laser-focused on providing one powerful product, you can. Box, Workday, Okta-we aren't going up against Goliath with a large army or hefty armor, we're each aiming at the market with intense precision. Just as David took down Goliath with one effectively delivered stone at the center of his forehead, focus on offering one superior offering and you will take down the giant.

4. Leverage your speed and agility-they matter more than size. Another thing David had on Goliath-he was nimble. The smaller, lesser-known challenger can think and act quickly, whereas giants move slowly. Take advantage of your speed. Go to market as soon as your product is ready, pivot when you need to, acquire when you need to, and always be open to evolving your offerings. Apple was able to pursue new offerings while IBM kept producing PC boxes because it didn't have the restraints of a large company. Netflix bet big on streaming video while executives at Blockbuster kept investing in stores. Large companies may be strong, but they're rooted in their existing practices and products, and even when they do make moves, they don't make them quickly.

5. Take "what doesn't kill you makes you stronger" to heart: So maybe that's a song lyric instead of a strategy, but facing a fierce competitor should be a valuable learning experience. David certainly learned about his strengths while considering how to topple Goliath-he had to or he wouldn't make it. You'll learn more about your market, your product and your opportunity by going up against the best than anything else. They will push you to better everything you do simply by competing for your customers. And knowing the ins-and-outs of their offering, how they advertise and why they win will help you to make your own products, services and marketing stand out. Competing with the biggest, strongest competitors will make you a stronger adversary.