Hey there!
Remember that this is something that doesn't really have a wrong answer. It's based on your personal opinion on the matter. Also, remember not to take what I write word for word as you could get in trouble for plagiarism. With that said, here are some options you might select:
1. Treat someone on the internet the same way you would in real life. Just because someone can't see you and you might never meet them in real life, you should still treat someone with respect, even if you might disagree on a matter. There is still another person on the other side of the conversation, so treat them as such!
2. Respect others' privacy. Don't hassle someone for personal information, as they don't know you and are not legally or personally obligated to give you more than, say, a first name, what country they live in, or other general information. If you ask and they say know, try again when you know one another better or leave it be. Don't be annoying.
3. Use your discretion. Often times, conversations with trolls aren't worth the effort. To avoid going down to their level, just avoid the conversation. You don't have to reply back to anything those people say. Leave your energy for people who really want to have a good conversation with you. Don't let those annoying people get you worked up. (And, most importantly, don't be one of those people).
Hope this helped you out! :-)